Beispiel #1
0
        public async Task <ActionResult <RolDTO> > Post([FromBody] RolCreateDTO rolCreate)
        {
            var rol    = mapper.Map <Rol>(rolCreate);
            var rolDTO = mapper.Map <RolDTO>(await repository.Save(rol));

            return(new CreatedAtRouteResult("ObtenerRolv1", new { id = rol.Id }, rolDTO));
        }
Beispiel #2
0
        public async Task Save(Rol rol, string menuler)
        {
            var rolid = await _rolRepository.Save(rol);

            foreach (var menuno in menuler.Split(","))
            {
                await _rolMenuRepository.Save(new RolMenu
                                              { CreatorId = rol.CreatorId, FirmaId = rol.FirmaId, MenuNo = int.Parse(menuno), RolId = rolid });
            }
        }
Beispiel #3
0
 public bool Save(Rol entity)
 {
     return(rolRepository.Save(entity));
 }
Beispiel #4
0
 public ActionResult CrearRol(Rol model)
 {
     _rolRepository.Save(model);
     return(RedirectToAction("ListarRoles"));
 }
Beispiel #5
0
 void Crear(Sg07_Rol Rol)
 {
     _RolRepository.Create <Sg07_Rol>(Rol);
     _RolRepository.Save();
 }