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

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

            // update
            return(new CatalogFolkModel(cat_FolkServices.Update(entity)));
        }
Example #2
0
        /// <summary>
        /// Create
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static CatalogFolkModel Create(CatalogFolkModel model)
        {
            // init entity
            var entity = new cat_Folk();

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

            // return
            return(new CatalogFolkModel(entity));
        }