Exemple #1
0
        /// <summary>
        /// Update
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static CatalogHolidayModel Update(CatalogHolidayModel model)
        {
            // init new entity
            var entity = new cat_Holiday();

            // set entity props
            model.FillEntity(ref entity);

            // update
            return(new CatalogHolidayModel(cat_HolidayServices.Update(entity)));
        }
Exemple #2
0
        /// <summary>
        /// Create
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static CatalogHolidayModel Create(CatalogHolidayModel model)
        {
            // init entity
            var entity = new cat_Holiday();

            // get entity from db
            model.FillEntity(ref entity);

            // return
            return(new CatalogHolidayModel(cat_HolidayServices.Create(entity)));
        }