public void BeforeScenario() { var dataDirectory = ConfigurationManager.AppSettings["DataDirectory"]; var absoluteDataDirectory = Path.GetFullPath(dataDirectory); AppDomain.CurrentDomain.SetData("DataDirectory", absoluteDataDirectory); context = new FunctionalDbContext(); }
static void Main(string[] args) { using (var context = new FunctionalDbContext("name=default")) { Console.WriteLine(context.Database.Connection.ConnectionString); var recordCount = context.MyModels.Count(); // Create a record if none currently exist if (recordCount == 0) { context.MyModels.Add(new MyModel { Id = 1, Name = "A Model" }); context.SaveChanges(); } } Console.WriteLine("Press any key to continue..."); Console.ReadLine(); }
public AdPriceRepository(FunctionalDbContext context) { _context = context; }
public OrganizationRepository(FunctionalDbContext context) { _context = context; }
public NotificationRepository(FunctionalDbContext context) { _context = context; }
public ContactRepository(FunctionalDbContext context) { _context = context; }
public CustomLinkRepository(FunctionalDbContext applicationDbContext) { FunctionalDbContext = applicationDbContext; }
public FunctionalUnitOfWork(IServiceProvider serviceProvider, FunctionalDbContext applicationDbContext) { ApplicationDbContext = applicationDbContext; ServiceProvider = serviceProvider; }
public QrCodeRepository(FunctionalDbContext context) { _context = context; }
public InvitationRepository(FunctionalDbContext context) { _context = context; }
public SocialNetworkRepository(FunctionalDbContext applicationDbContext) { FunctionalDbContext = applicationDbContext; }
public MessageRepository(FunctionalDbContext context) { _context = context; }
public CardRepository(FunctionalDbContext applicationDbContext) { FunctionalDbContext = applicationDbContext; }
public CountriesRepository(FunctionalDbContext context) { _context = context; }
public PaymentRepository(FunctionalDbContext context) { _context = context; }
public SubscriptionPackRepository(FunctionalDbContext applicationDbContext) { FunctionalDbContext = applicationDbContext; }
public EventTrackingItemRepository(FunctionalDbContext context) { _context = context; }
public TeamRepository(FunctionalDbContext context) { _context = context; }