Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="obj"></param>
        public static InsuranceModel Insert(InsuranceModel model)
        {
            var entity = new hr_Insurance();

            model.FillEntity(ref entity);
            return(new InsuranceModel(hr_InsuranceServices.Create(entity)));
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="obj"></param>
        public static InsuranceModel Update(InsuranceModel model)
        {
            var entity = hr_InsuranceServices.GetById(model.Id);

            if (entity == null)
            {
                return(null);
            }
            model.FillEntity(ref entity);
            return(new InsuranceModel(hr_InsuranceServices.Update(entity)));
        }