How can add a record via Entity Framework to a table that contains one identity column and one Hash column that automatically assign value via newid().
Here is my code.
using (GM.Entity.Entities context = new GM.Entity.Entities())
{
var q = context.xattachment.Add(new Entity.xattachment(){});
context.SaveChanges();
return q.AttachmentID;
}
When I add a value like new Entity.xattachment(){ Hash = "1234"}
it works fine. How to add a row with not values such as new Entity.xattachment(){}
?