Пример #1
0
        private static MovieTypeDO Save(MOV_M_Type input, int userID)
        {
            MovieTypeDO inputDO = new MovieTypeDO( );

            ObjectMapper.MapObjects(input, inputDO, AuditInfo.Fields);
            return(Save(inputDO, userID));
        }
Пример #2
0
        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);
        }