public async Task <ActionResult <bool> > Add(string docId, FastFoods fastFoods) { try { return(Ok(new Notification { Success = true, Data = await _fastFoodService.AddAsync(docId, fastFoods) })); } catch (Exception ex) { return(BadRequest(new Notification { Success = false, Errors = ex.Message })); } }
public Task <bool> UpdateAsync(string docId, FastFoods fastFoods) { var docDic = CastEntityToDict(fastFoods); return(_fastFoodsRepository.UpdateAsync(docId, docDic)); }