0

I have the following class:

public class TestData: RealmObject
{
  [Key]
  public Guid DataId { get; set; }
  [Required]
  public string Name { get; set; }
}

When I try to compile the project, I get the following error:

Fody/RealmWeaver: DataId is a 'System.Guid' which is not yet supported.

As I have already faced similar problems, I know that a converter class could do some Guid-String conversion (and as I can see, it is about to be implemented in realm-java).

How can I create such a converter class in .Net? Any idea where to look?

Nestor
  • 8,194
  • 7
  • 77
  • 156
  • I'm guessing it's because `Guid` is a struct. I suppose it'd be hackish, but you could have another field where the getter returns the string representation. It appears that's similar to what some people in the issue you've linked are doing – James Parsons Jun 11 '18 at 14:10
  • @James_Parsons I try to avoid that solution as it requires lots and lots of boilerplate code and my models could have 10-30 Guid type fields. – Nestor Jun 11 '18 at 14:12

0 Answers0