public static void Initialize(ErpcDbContext context) { context.Database.EnsureCreated(); if (context.Accounts.Any()) { return; } //Create a plan Plan plan = new Plan { Name = "BusinessA", Feautures = "Full-features" }; context.Plans.Add(plan); context.SaveChanges(); string HashedPassword = Hasher.GetHash("admin1"); //Create user User user = new User { Name = "Maykol Laguna", Email = "*****@*****.**", HashedPassword = HashedPassword }; context.Users.Add(user); context.SaveChanges(); //Create an account Account account = new Account { Features = "Full", Plan = plan, SubscriptionId = 1000 }; context.Accounts.Add(account); context.SaveChanges(); //Create membership Membership membership = new Membership { Access = "admin", Account = account, User = user }; context.Memberships.Add(membership); context.SaveChanges(); }
public SalesController(ErpcDbContext context, IImageHandler imageHandler) { _context = context; _imageHandler = imageHandler; }
public RrhhController(ErpcDbContext context) { _context = context; }
public UserService(IOptions <AppKeys> appSettings, ErpcDbContext _context) { _appSettings = appSettings; context = _context; }
public EmployeeController(ErpcDbContext context, IImageHandler imageHandler) { _context = context; _imageHandler = imageHandler; }
//private readonly UserManager<AppUser> _userManager; public CalendarController(ErpcDbContext context) { _context = context; }
public AccountController(ErpcDbContext context) { _context = context; }
public UsersController(ErpcDbContext _context, IUserService userService) { context = _context; _userService = userService; }
public CompanyController(ErpcDbContext context, IImageHandler imageHandler) { _context = context; _imageHandler = imageHandler; }
public ProductController(ErpcDbContext context, IImageHandler imageHandler) { _context = context; _imageHandler = imageHandler; }
public ReceiptController(ErpcDbContext context) { _context = context; }
public CustomerController(ErpcDbContext context) { _context = context; }