/// <summary> /// Crear registro de menu /// Autor: Jair Guerrero /// Fecha: 2021-02-20 /// </summary> public long Create(MenuAM entity) { try { var menu = mapper.Map <Menu>(entity); IRepository <Menu> repo = new MenuRepo(context); return(repo.Create(menu)); } catch (Exception ex) { throw new Exception(ex.Message, ex.InnerException); } }
/// <summary> /// Actualizar Sancion /// Autor: Jair Guerrero /// Fecha: 2020-08-06 /// </summary> public void Update(MenuAM entity) { try { var sancion = mapper.Map <Menu>(entity); IRepository <Menu> repo = new MenuRepo(context); repo.Update(sancion); } catch (Exception ex) { throw new Exception(ex.Message, ex.InnerException); } }