public async Task <Concurso> Insert(Concurso concurso)
        {
            await SqlAccessService.InsertDataAsync(concurso);

            await new DigitoVerificadorRepository().Validate <ConcursoVerificable>(
                DigitoVerificadorTablasEnum.Concursos);
            return(concurso);
        }
        public new async Task <Response <TraduccionValue> > InsertDataAsync(Idioma idioma, TraduccionValue entity)
        {
            await SqlAccessService.InsertDataAsync(new Parameters()
                                                   .Add("Id_Termino", entity.TerminoId)
                                                   .Add("Id_Idioma", idioma.Id)
                                                   .Add("Traduccion", entity.Traduccion));

            return(Response <TraduccionValue> .Ok(entity));
        }
Example #3
0
        public new async Task <Response <Rol> > InsertDataAsync(Rol rol)
        {
            await SqlAccessService.InsertDataAsync(rol,
                                                   new Parameters()
                                                   .Add("Type", "Rol"));

            await SqlAccessService.InsertDataAsync(new Parameters()
                                                   .Add("RolId", "NULL")
                                                   .Add("PermisoId", rol.Id),
                                                   "Rol_Permiso");

            foreach (var permission in rol.Permissions)
            {
                await SqlAccessService.InsertDataAsync(new Parameters()
                                                       .Add("RolId", rol.Id)
                                                       .Add("PermisoId", permission.Id),
                                                       "Rol_Permiso");
            }
            return(Response <Rol> .Ok(rol));
        }
Example #4
0
 public void Insertar(Log log, int userId)
 {
     SqlAccessService.InsertDataAsync(log,
                                      new Parameters()
                                      .Add("Usuario_Id", userId));
 }
Example #5
0
        public async Task <Response <TEntity> > InsertDataAsync(TEntity entity)
        {
            await SqlAccessService.InsertDataAsync(entity);

            return(Response <TEntity> .Ok(entity));
        }