I have bound a datagrid to a context and add some rows at runtime but it generates an exception and couldn’t save changes due to property of type Guid generates only empty Guid.
How generate Guid from entity framework when object created?
I have bound a datagrid to a context and add some rows at runtime
Share
You can decorate your Guid property with
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
This will generate a new row id every time you insert.