public void Edit(UserFull p_userFull) { var Temp = MapperUserFull.MapUserFullToUSREntity(p_userFull); using (var db = new MES_DATABASE()) { db.USR_UserList.Attach(Temp); db.Entry(Temp).State = EntityState.Modified; db.SaveChanges(); } }
public void Edit(TranslationModel p_entity) { var Temp = MapperTranslation.MapTranslationToTra(p_entity); using (var db = new MES_DATABASE()) { if (!db.TRA_TranslationState.Local.Any(c => c.ID_TRA == p_entity.ID_TRA)) { db.TRA_TranslationState.Attach(Temp); db.Entry(Temp).State = EntityState.Modified; } db.SaveChanges(); } }
public void Edit(StateModel p_entity) { var Temp = MapperState.MapStateToSTA(p_entity); using (var db = new MES_DATABASE()) { if (!db.STA_StateList.Local.Any(c => c.ID_STA == p_entity.ID_STA)) { db.STA_StateList.Attach(Temp); db.Entry(Temp).State = EntityState.Modified; } db.SaveChanges(); } }
public void Edit(EntityDetailModel p_entity) { // var Temp = MapperEntity.MapEntityDetilToENT(p_entity); var Temp = Mapper.Map <ENT_Entity>(p_entity);; using (var db = new MES_DATABASE()) { if (!db.ENT_Entity.Local.Any(c => c.ID_ENT == p_entity.ID_ENT)) { db.ENT_Entity.Attach(Temp); db.Entry(Temp).State = EntityState.Modified; } db.SaveChanges(); } }