I have a table that has an Id field which is a primary key and is a uniqueidentifier type.
The type class is decorated with the following attributes
[PrimaryKey]
[Default(typeof(Guid), "newid()")]
public Guid Id { get; set; }
How can I get the ID of newly created record?
Insert only returns the last “AutoIncremented” ID as a long and Save just returns a boolean dependant on whether it’s created.
I need the ID to be generated by the database, so can’t create the GUID in code.