public ActionResult Delete(int id) { return(View("_Delete", ItemRepo.GetById(id))); }
public ActionResult List() { return(View("_List", ItemRepo.Get())); }
public ActionResult Edit(int Id) { return(View("_Edit", ItemRepo.GetById(Id))); }
// DELETE api/<controller>/5 public Responses Delete(int id) { return(ItemRepo.Delete(id)); }
public SampleDataController(ItemRepo itemRepo) { _itemRepo = itemRepo; }
// PUT api/<controller>/5 public Responses Put(int id, [FromBody] ItemViewModel entity) { entity.Id = id; return(ItemRepo.Update(entity)); }
// POST api/<controller> public Responses Post([FromBody] ItemViewModel entity) { return(ItemRepo.Update(entity)); }
public IEnumerable <ItemViewModel> search(string filter) { return(ItemRepo.GetTen(filter)); }
// GET api/<controller>/5 public ItemViewModel Get(int id) { return(ItemRepo.GetById(id)); }
public IEnumerable <ItemViewModel> Get(string search) { return(ItemRepo.GetTen(search)); }