public List <ent.AspNetRoles> ObtenerAllRoles() { List <ent.AspNetRoles> roles = new List <ent.AspNetRoles>(); SqlConnection conn = (SqlConnection)_repositorio.ObtenerContexto(); SqlCommand cmd = conn.CreateCommand(); conn.Open(); cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.CommandText = "USP_GetAllRoles"; using (var reader = cmd.ExecuteReader()) { while (reader.Read()) { var item = new ent.AspNetRoles { Id = reader["Id"].ToString(), Name = reader["Name"].ToString(), NormalizedName = reader["Name"].ToString() }; roles.Add(item); } } conn.Close(); return(roles); }
public void Eliminar(ent.AspNetRoles entidad) { _repositorio.Eliminar(entidad); _repositorio.Grabar(); }
public void Modificar(ent.AspNetRoles entidad) { _repositorio.Modificar(entidad); _repositorio.Grabar(); }
public void Adicionar(ent.AspNetRoles entidad) { _repositorio.Adicionar(entidad); _repositorio.Grabar(); }