Пример #1
0
        public ActionResult Delete(int id, SponsorViewModel model)
        {
            Sponsors deleteSponsor = new Sponsors();

            deleteSponsor = sponsor.GetById(id);

            model.InjectFrom(deleteSponsor);

            sponsor.DeleteSponsor(deleteSponsor);

            return(RedirectToAction(nameof(Index)));
        }
Пример #2
0
 public ActionResult DeleteSponsor(int SponsorId)
 {
     _mainResponse = _SponsorService.DeleteSponsor(SponsorId);
     _jsonString   = Mapper.Convert <BaseResponse>(_mainResponse);
     return(new OkObjectResult(_jsonString));
 }