entity framework - how to avoid updating some column

Posted by Ermahesh2009 under Error and Solution on 7/18/2014 | Points: 10 | Views : 4785 | Status : [Member] | Replies : 1

Dear All

in my database each database table have these field and their working

CREATEDAT - showing record creation place (not going update)
CREATEDBY - showing record creation user (not going update)
CREATEDON - showing record creation datetime(not going update)
UPDATEDAT - showing record updated place (update when record is updated)
UPDATEDBY - showing record updated user (update when record is updated)
UPDATEDON - showing record updated dattime(update when record is updated)
STATUS - - showing record status (update when record is updated)

now adding record is okey for me . i have problem in updating record .
whenever i am doing updates its also update CREATEDAT ,CREATEDBY,CREATEDON by null value .

I am doing save process like this
step 1 : take data into model from UI .
step 2: using mapper to convert model data into entity class .(here is problem its also updating CREATEDAT ,CREATEDBY,CREATEDON but in step 1 i don't want to set model properties CREATEDAT ,CREATEDBY,CREATEDON )
step 3: update entity class to EF .

how i can avoid this setting values in CREATEDAT ,CREATEDBY,CREATEDON .

Thanks in advance


Posted by: Bandi on: 7/18/2014 [Member] [MVP] Platinum | Points: 25


Mark This Response as Answer

Ermahesh2009, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response