// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { GetUser.Get(services); services.AddMvc(); services.AddSingleton <IHttpContextAccessor, HttpContextAccessor>(); services.AddSingleton <IUser, Class12>(); }
public async Task <TestModel> UserById(int id) { List <SQLParam> sQLParams = new List <SQLParam>() { new SQLParam("@Id", id) }; return(await _getUser.Get(sQLParams)); }