public ResponseBag <IEnumerable <EMarca> > GetAll()
        {
            var entities = _repository.GetAll();

            return(new ResponseBag <IEnumerable <EMarca> >
            {
                Ok = true,
                ObjectResponse = entities
            });
        }
예제 #2
0
 /// <summary>
 /// Obtiene todas la entidades Marca existentes en el repositorio
 /// </summary>
 /// <returns>Colección de Marca</returns>
 public IList <Marca> GetAll()
 {
     return(_repository.GetAll());
 }
예제 #3
0
 public async Task <ActionResult <IEnumerable <Marca> > > Get()
 => CustomResponse(await _marcaRepository.GetAll());
예제 #4
0
 // GET: Marcas
 public ActionResult Index()
 {
     return(View(repo.GetAll()));
 }
예제 #5
0
 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));
     }
 }
예제 #6
0
 public IActionResult Get()
 {
     return(Ok(repo.GetAll()));
 }
예제 #7
0
 public IEnumerable <Marca> Get()
 {
     return(repo.GetAll());
 }