public async Task <ActionResult <Giveaway> > PostGiveaway(GiveawayPostRequest giveawayPostRequest) { var result = new Giveaway { Content = giveawayPostRequest.Content, Participants = giveawayPostRequest.Participants, Title = giveawayPostRequest.Title }; await _dataContext.AddAsync(result);; await _dataContext.SaveChangesAsync(); return(result); }
public async Task <ActionResult <Giveaway> > PostGiveaway(GiveawayPostRequest giveawayPostRequest) { return(await _dataRepository.PostGiveaway(giveawayPostRequest)); }