public IRepository <T> Repository <T>() where T : DomainBase { string typeOfRepo = typeof(T).FullName; if (!_repositories.ContainsKey(typeOfRepo)) { _repositories.Add(typeOfRepo, RepositoryProvider.GetInstance <T>(DbContext)); } _repositories.TryGetValue(typeOfRepo, out var data); return((Repository <T>)data); }