Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static GoAboardModel Create(GoAboardModel model)
        {
            // init entity
            var entity = new hr_GoAboard();

            // fill entity
            model.FillEntity(ref entity);

            // create
            return(new GoAboardModel(hr_GoAboardServices.Create(entity)));
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static GoAboardModel Update(GoAboardModel model)
        {
            // int entity
            var entity = hr_GoAboardServices.GetById(model.Id);

            if (entity == null)
            {
                return(null);
            }

            // fill entity
            model.FillEntity(ref entity);

            // update
            return(new GoAboardModel(hr_GoAboardServices.Update(entity)));
        }