public ResponseBag <IEnumerable <EMarca> > GetAll() { var entities = _repository.GetAll(); return(new ResponseBag <IEnumerable <EMarca> > { Ok = true, ObjectResponse = entities }); }
/// <summary> /// Obtiene todas la entidades Marca existentes en el repositorio /// </summary> /// <returns>Colección de Marca</returns> public IList <Marca> GetAll() { return(_repository.GetAll()); }
public async Task <ActionResult <IEnumerable <Marca> > > Get() => CustomResponse(await _marcaRepository.GetAll());
// GET: Marcas public ActionResult Index() { return(View(repo.GetAll())); }
public HttpResponseMessage Get([FromUri] string[] include, [FromUri] bool indent = false) { try { var formatter = new MaxDepthJsonMediaTypeFormatter() { Indent = indent }; if (include.Length > 0) { formatter.SerializerSettings.MaxDepth = 100; //include.Max<string>(s => s.Split('.').Length * 5); formatter.SerializerSettings.PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.Objects; } else { formatter.SerializerSettings.MaxDepth = 1; } return(Request.CreateResponse <IQueryable <Marca> >(HttpStatusCode.OK, marcaRepository.GetAll(include).AsQueryable(), formatter)); } catch (Exception _excepcion) { log.Error(_excepcion); return(Request.CreateResponse(HttpStatusCode.InternalServerError, _excepcion)); } }
public IActionResult Get() { return(Ok(repo.GetAll())); }
public IEnumerable <Marca> Get() { return(repo.GetAll()); }