// GET api/banner/id public HttpResponseMessage Get(int id) { var banner = _banner.Get(id); if (banner != null) { return(Request.CreateResponse(HttpStatusCode.OK, banner)); } return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Banner not found for id.")); }
public IActionResult Edit(int id) { var banner = bannerRepositori.Get(id); var editBanner = new Edit() { BannerPhoto = banner.BannerPhoto, BannerName = banner.BannerName, BannerId = banner.BannerId, }; return(View(editBanner)); }