private static MovieTypeDO Save(MOV_M_Type input, int userID) { MovieTypeDO inputDO = new MovieTypeDO( ); ObjectMapper.MapObjects(input, inputDO, AuditInfo.Fields); return(Save(inputDO, userID)); }
public static MovieTypeDO Save(MovieTypeDO inputDO, int userID) { Repository <MOV_M_Type> rep = new Repository <MOV_M_Type> (MArchiveDataContextProvider.Instance); MOV_M_Type objectToAdd = null; objectToAdd = new MOV_M_Type( ); ObjectMapper.MapObjects(inputDO, objectToAdd, AuditInfo.Fields); rep.InsertOnSubmit(objectToAdd); rep.DCP.CommitChanges(userID); InvalidateCache(CacheAreaKey); ObjectMapper.MapObjects(objectToAdd, inputDO); return(inputDO); }