Example #1
0
        /// <summary>
        /// Crear registro de Sancion
        /// Autor: Jair Guerrero
        /// Fecha: 2020-12-05
        /// </summary>
        public long Create(PersonAM entity)
        {
            try
            {
                var sancion = mapper.Map <Person>(entity);

                IRepository <Person> repo = new PersonRepo(context);
                return(repo.Create(sancion));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex.InnerException);
            }
        }
Example #2
0
        /// <summary>
        /// Actualizar person
        /// Autor: Jair Guerrero
        /// Fecha: 2021-02-20
        /// </summary>
        public void Update(PersonAM entity)
        {
            try
            {
                var person = mapper.Map <Person>(entity);

                IRepository <Person> repo = new PersonRepo(context);
                repo.Update(person);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex.InnerException);
            }
        }