public static IList <TEntity> Data <TEntity>(BaseDao <ApplicationDbContext> dao) where TEntity : class, new() { string key = typeof(TEntity).Name; if (Default[key] == null) { Default[key] = dao.GetDetached <TEntity>(); } return(Default[key] as IList <TEntity>); }