This question, asked a year ago, is similar: Does the Entity Framework 4 support generators for id values like NHibernate?
But what I\'d like to know is if the code
[Key] public string Id { get; set; }
and then use new GUID ToString
Units.Add( new Unit(){Id=Guid.NewGuid().ToString(), Name="123"});