Пример #1
0
 public ActionResult Delete(int id)
 {
     return(View("_Delete", ItemRepo.GetById(id)));
 }
Пример #2
0
 public ActionResult List()
 {
     return(View("_List", ItemRepo.Get()));
 }
Пример #3
0
 public ActionResult Edit(int Id)
 {
     return(View("_Edit", ItemRepo.GetById(Id)));
 }
Пример #4
0
 // DELETE api/<controller>/5
 public Responses Delete(int id)
 {
     return(ItemRepo.Delete(id));
 }
Пример #5
0
 public SampleDataController(ItemRepo itemRepo)
 {
     _itemRepo = itemRepo;
 }
Пример #6
0
 // PUT api/<controller>/5
 public Responses Put(int id, [FromBody] ItemViewModel entity)
 {
     entity.Id = id;
     return(ItemRepo.Update(entity));
 }
Пример #7
0
 // POST api/<controller>
 public Responses Post([FromBody] ItemViewModel entity)
 {
     return(ItemRepo.Update(entity));
 }
Пример #8
0
 public IEnumerable <ItemViewModel> search(string filter)
 {
     return(ItemRepo.GetTen(filter));
 }
Пример #9
0
 // GET api/<controller>/5
 public ItemViewModel Get(int id)
 {
     return(ItemRepo.GetById(id));
 }
Пример #10
0
 public IEnumerable <ItemViewModel> Get(string search)
 {
     return(ItemRepo.GetTen(search));
 }