sql server - How to insert rowguid and ModifiedDate in EntityFrameworkDataService -
i'm using entityframeworkdataservice in wcf service , setup rowguid , modifieddata column in db table. these values generated newid() , getdate() in db. problem when add new object client application below:
addresstype @ = new addresstype(); at.name = "home"; ccn.addtoaddresstypes(at); ccn.savechanges();
it has error. if add rowguid , modifieddate,
at.rowguid = guid.newguid(); at.modifieddate = datetime.now;
it can add object table. don't want use rowguid , modified value generated client side. i'd know how have handle rowguid , modified value in entityframeworkdataservice.
in model diagram (.edmx), have change storegeneratedpattern property "none" "computed". solve problem. please see more details @ http://www.ladislavmrnka.com/2011/03/the-bug-in-storegeneratedpattern-fixed-in-vs-2010-sp1/
Comments
Post a Comment