From 7eeaba40d881dd1d6b5d513ad82451cd14650bb8 Mon Sep 17 00:00:00 2001 From: Odumosu Matthew Babatunde <105985964+iamcymentho@users.noreply.github.com> Date: Wed, 25 Oct 2023 12:09:56 +0100 Subject: [PATCH] Create IFoodService.cs Description: I Introduced the IFoodService interface to establish a clear contract for the FoodService class. This allows for better code organization, adherence to the Dependency Inversion Principle, and facilitates unit testing. The interface defines the GetAllFoods method, enhancing the modularity and maintainability of the codebase. This commit is a prerequisite for separating concerns and achieving a more structured and testable service layer. --- SampleWebApiAspNetCore/Services/IFoodService.cs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 SampleWebApiAspNetCore/Services/IFoodService.cs diff --git a/SampleWebApiAspNetCore/Services/IFoodService.cs b/SampleWebApiAspNetCore/Services/IFoodService.cs new file mode 100644 index 0000000..4adee8e --- /dev/null +++ b/SampleWebApiAspNetCore/Services/IFoodService.cs @@ -0,0 +1,7 @@ +using Microsoft.AspNetCore.Mvc; +using SampleWebApiAspNetCore.Models; + +namespace SampleWebApiAspNetCore.Services +{ + public interface GetAllFoods(QueryParameters queryParameters, ApiVersion version) +}