linq to sql - How to modify linqtosql entityref objects in handcoded MVC model? -
i trying set own mvc model rather letting environment create 1 via graphic designer tool. had hoped make easier keep separate repositories parts of model space far has caused me nothing grief. the first problem ran entityref classes had updated via selectlist control in view. managed work adding interal id field every entityref designer.cs do. however, has made model class quite bit more complex code below demonstrates. unfortunately, run problem when want explicitly update of entities in controller. if manually set id field, update dropped, if change entity exception while saving. my model [table(name = "dbo.jobs")] public class job { [column(isprimarykey = true, isdbgenerated = true, autosync = autosync.oninsert)] public int jobid { get; set; } internal string _companyid; // string legacy reasons [column(storage = "_companyid")] public string companyid{ { return _companyid} set { if ((_companyid != val...