Create singleton when private constructor have parameters – Asp.net
I would like to implement singleton pattern in StudentProvider and then access method through interface. StudentProvider constructor accepts few parameters. Here's the sample working code without singleton. public interface IStudentProvider { Task<StudentViewModel> GetStudentAsync(); } public class StudentProvider : IStudentProvider {…