From c9539db2045bae3c8c0e958085f21b5c860ae850 Mon Sep 17 00:00:00 2001 From: SalamBhai Date: Sat, 22 Jan 2022 16:57:57 +0100 Subject: [PATCH 1/3] asd --- Implementations/Services/ResturantService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Implementations/Services/ResturantService.cs b/Implementations/Services/ResturantService.cs index 39f85d7..456ff99 100644 --- a/Implementations/Services/ResturantService.cs +++ b/Implementations/Services/ResturantService.cs @@ -15,7 +15,7 @@ public BaseResponse AddFoodItem(CreateFoodItemRequesModel model) public IList DisplayFoodItems() { - throw new NotImplementedException(); + throw new NotImplementedException(); } public FoodItemDto FoodItemDetail(Guid id) From c8cdfa6d9fe9a84d445853afc70a4a1a5804a71d Mon Sep 17 00:00:00 2001 From: SalamBhai Date: Sat, 22 Jan 2022 17:28:57 +0100 Subject: [PATCH 2/3] I have performed my task --- Implementations/Services/ResturantService.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Implementations/Services/ResturantService.cs b/Implementations/Services/ResturantService.cs index 51acff7..75ff4cc 100644 --- a/Implementations/Services/ResturantService.cs +++ b/Implementations/Services/ResturantService.cs @@ -1,9 +1,11 @@ using CommunityProApp.Dtos; +using CommunityProApp.Entities; using CommunityProApp.Interfaces.Repositories; using CommunityProApp.Interfaces.Services; using CommunityProApp.Models; using System; using System.Collections.Generic; +using System.Linq; namespace CommunityProApp.Implementations.Services { @@ -22,7 +24,19 @@ public BaseResponse AddFoodItem(CreateFoodItemRequesModel model) public IList DisplayFoodItems() { - throw new NotImplementedException(); + + return _resturantRepository.Get().Select(foodItem => new FoodItemDto + { + Id=foodItem.Id, + Name=foodItem.Name, + Description=foodItem.Description, + Price=foodItem.Price, + Discount=foodItem.Discount, + ProductImage=foodItem.ProductImage, + Rating=foodItem.Rating, + ProductAdditionalImage1=foodItem.ProductAdditionalImage1, + ProductAdditionalImage2=foodItem.ProductAdditionalImage2, + }).ToList(); } public FoodItemDto FoodItemDetail(Guid id) From cf5eb6590cf31d933ee62ed630446b0cfc27e3a3 Mon Sep 17 00:00:00 2001 From: SalamBhai Date: Sat, 22 Jan 2022 20:51:43 +0100 Subject: [PATCH 3/3] commit