public AllSpeciesResponse getAll() { try { var response = new AllSpeciesResponse(); var bc = new SpecieComponent(); response.Result = bc.ToList(); return(response); } catch (Exception ex) { var httpError = new HttpResponseMessage() { StatusCode = (HttpStatusCode)422, ReasonPhrase = ex.Message }; throw new HttpResponseException(httpError); } }
// GET: MiEspecie public ActionResult Index() { return(View(db.ToList())); }
public ActionResult Index() { var especies = db.ToList(); return(View(especies)); }
public ActionResult Index2() { ViewBag.Clients = new SelectList(dbClient.ToList(), "Id", "Name"); ViewBag.Species = new SelectList(dbSpecie.ToList(), "Id", "Nombre"); return View(); }
public List <Species> ToList() { var especies = bs.ToList(); return(especies); }