Exemplo n.º 1
0
        private static void Initialize(SyncAppContext context)
        {
            if (context.Database.EnsureCreated())
            {
                User[] userEntries = new User[]
                {
                    new User {
                        UserId = Guid.NewGuid(), LoginId = "tamil", UserName = "******", Password = "******"
                    },
                    new User
                    {
                        UserId   = Guid.NewGuid(),
                        LoginId  = "udayan",
                        UserName = "******",
                        Password = "******"
                    }
                };

                context.Users.AddRange(userEntries);
                context.LeadStatuses.AddRange(LeadStatus.GetMasterData());
                context.Users.AddRange(userEntries);
                context.LeadSources.AddRange(LeadSource.GetMasterData());
                Addon365.WebSync.Models.SampleData.PopulateLicenseMachine();
                context.Profiles.AddRange(Addon365.WebSync.Models.SampleData.pro);
                context.Customers.AddRange(Addon365.WebSync.Models.SampleData.cus);
                context.Licenses.AddRange(Addon365.WebSync.Models.SampleData.lic);
                context.LicenseMachines.AddRange(Addon365.WebSync.Models.SampleData.licMac);

                context.SaveChanges();
            }
        }
Exemplo n.º 2
0
 public UsersController(SyncAppContext context)
 {
     _context = context;
 }
Exemplo n.º 3
0
 public LicensesController(SyncAppContext context)
 {
     _context = context;
 }
Exemplo n.º 4
0
 public LeadsController(SyncAppContext context)
 {
     _context = context;
 }
Exemplo n.º 5
0
 public ProfilesController(SyncAppContext context)
 {
     _context = context;
 }