示例#1
0
        public static LyncNinjaContext InitialiseLyncNinjaContext()
        {
            var options = new DbContextOptionsBuilder <LyncNinjaContext>()
                          .UseLazyLoadingProxies()
                          .UseInMemoryDatabase(Guid.NewGuid().ToString())
                          .Options;

            var context = new LyncNinjaContext(options);

            context.AddRange(DbSets.LinkedResources);
            context.SaveChanges();

            return(context);
        }
示例#2
0
 public LinkedResourceData(LyncNinjaContext dbContext, ILogger <LinkedResourceData> logger)
 {
     _dbContext = dbContext;
     _logger    = logger;
 }