public async Task <MealResponse> DeleteAsync(int id) { var existingItem = await repository.FindByIdAsync(id); if (existingItem == null) { return(new MealResponse("Meal not found")); } try { repository.Remove(existingItem); await unitOfWork.CompleteAsync(); return(new MealResponse(existingItem)); } catch (Exception ex) { return(new MealResponse($"Error while deleting meal: {ex.Message}")); } }