I have one file Repository.cs that contains an interface and its implementation like so:
Repository.cs
public interface IRepository { IEnumerable
you have to register your repository like this
services.AddSingleton();