
IService<T> or defining IProductService, ICustomerService
Sep 1, 2020 · Is the current contract for IService<T> represent what all services will be in your project? What if you decided to add a PasswordService? I don't think that having a ListAsync …
design patterns - Service Locator C# - Code Review Stack Exchange
Aug 3, 2024 · I made this service locator to be used on my game projects, but it uses pure c#. Basically, new services needs to inherit from the common IService interface to be registered. I …
Adding extension methods to IServiceCollection in ASP.NET Core
Jan 17, 2018 · I have the following extension method to add themes support to my application: public static void AddThemes(this IServiceCollection services, Action<ThemesOptions> …
c# - Using IServiceScopeFactory without implementing the Service ...
Jan 20, 2018 · I want to use IServiceScopeFactory in a way, which is not the Service Locator anti-pattern. Therefore I thought about making a generic one, which supports explicitly only the …
Calculating an employee's bonus - Code Review Stack Exchange
Jun 9, 2015 · Tidy up your condition: (Nornagest nearly has it correct he needs to reverse the order and put in the else condition otherwise somebody with iService of >= 20 is going to be …
Code to pass json data with WCF REST POST
Dec 19, 2019 · I have a WCF REST POST that has JSON data as input, IService.cs: [OperationContract] [WebInvoke(Method = "POST", ResponseFormat = …
Multiple WCF Service with boilerplate error handling
Jan 25, 2019 · string RefString { get; } //Uid for the Iservice, used in Esprit as the name of the setting that contains the url for the service string Echo(string @string);
Repository/Service Design Pattern - Code Review Stack Exchange
I use the Repository/Service design pattern in my projects and I have found something that might be a bit redundant. Am I writing any unnecessary code? With that in mind, here is my …