TobiasBuchholz / Plugin.Firebase

Wrapper around the native Android and iOS Firebase Xamarin SDKs
MIT License
211 stars 49 forks source link

[QUESTION] Problem parsing enums - Firestore #261

Closed hergarcia closed 7 months ago

hergarcia commented 7 months ago

Hello, I have this question that I am not being able to finde an answer and is blocking me to develop my App in MAUI.

I am receiving "Object of type 'System.Int64' cannot be converted to type 'MyEnum'." Is there a way to keep using the Enums directly in my model or have to refactor all and do the int way?

Thanks in advance!

hergarcia commented 7 months ago

I just found the solution.

public class MyEnum : long { }

I hope this helps somebody and sorry for the silly question.