public async Task <ActionResult <Promocode> > Get(string code) { var promocode = await _repo.GetPromocode(code); if (promocode == null) { return(new NotFoundResult()); } return(new ObjectResult(promocode)); }