コード例 #1
0
        public static void Initialize <T>(CareHomeContext context) where T : class
        {
            if (context.Set <T>().Any())
            {
                return;
            }

            Seed <T>(context);
        }
コード例 #2
0
ファイル: AppRepository.cs プロジェクト: taboo09/CQRS
 public virtual async Task <T> GetByIdAsync(int id)
 {
     return(await _dbContext.Set <T>().FindAsync(id));
 }