public AppliesToOffer Create(AppliesToOffer applies) { _repo.Add(applies); _repo.SaveChanges(); return(applies); }
public AppliesToOfferDTO CreateBasicAppliesToOfferDTO(AppliesToOffer ap) { return(new AppliesToOfferDTO { AppliesToOfferId = ap.AppliesToOfferId, OfferId = ap.OfferId, Offer = ap.Offer, UserId = ap.UserId, User = ap.User }); }
public IHttpActionResult Create(AppliesToOffer offer) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var offerr = _service.Create(offer); return(Ok(offerr)); }
public IHttpActionResult Update(AppliesToOffer offer, int id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (!_service.Update(offer)) { return(NotFound()); } return(StatusCode(HttpStatusCode.NoContent)); }
public bool Update(AppliesToOffer applies) { _repo.Update(applies); _repo.SaveChanges(); return(true); }
public async Task <AppliesToOffer> AddApplieToOffer(AppliesToOffer apl) { return(await base.Post("", apl)); }