I have one file Repository.cs that contains an interface and its implementation like so:
Repository.cs
public interface IRepository { IEnumerable
You have to add your implementation to DI (Dependeny Injection) section. For .Net Core Mvc, it would be like this:
public void ConfigureServices(IServiceCollection services) { services.AddDbContext(options => options.UseInMemoryDatabase() ); services.AddScoped(); }