// The following code creates the database and schema if they don't exist.
 // This is a temporary workaround since deploying database through EF migrations is
 // not yet supported in this release.
 // Please see this http://go.microsoft.com/fwlink/?LinkID=615859 for more information on how to do deploy the database
 // when publishing your application.
 private static void EnsureDatabaseCreated(LetsShareDbContext context)
 {
     if (!_databaseChecked)
     {
         _databaseChecked = true;
         context.Database.Migrate();
     }
 }
 public AccountController(
     UserManager<ApplicationUser> userManager,
     SignInManager<ApplicationUser> signInManager,
     IEmailSender emailSender,
     ISmsSender smsSender,
     LetsShareDbContext libraryDbContext)
 {
     _userManager = userManager;
     _signInManager = signInManager;
     _emailSender = emailSender;
     _smsSender = smsSender;
     _libraryDbContext = libraryDbContext;
 }
 public AccountController(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     IEmailSender emailSender,
     ISmsSender smsSender,
     LetsShareDbContext libraryDbContext)
 {
     _userManager      = userManager;
     _signInManager    = signInManager;
     _emailSender      = emailSender;
     _smsSender        = smsSender;
     _libraryDbContext = libraryDbContext;
 }
 public LetsShareSampleData(LetsShareDbContext context)
 {
     _context = context;
 }
 // The following code creates the database and schema if they don't exist.
 // This is a temporary workaround since deploying database through EF migrations is
 // not yet supported in this release.
 // Please see this http://go.microsoft.com/fwlink/?LinkID=615859 for more information on how to do deploy the database
 // when publishing your application.
 private static void EnsureDatabaseCreated(LetsShareDbContext context)
 {
     if (!_databaseChecked)
     {
         _databaseChecked = true;
         context.Database.Migrate();
     }
 }
 public AmountForEntityViewComponent(LetsShareDbContext libraryContext)
 {
     _libraryContext = libraryContext;
 }
示例#7
0
 public AmountForEntityViewComponent(LetsShareDbContext libraryContext)
 {
     _libraryContext = libraryContext;
 }