Esempio n. 1
0
        static void Main(string[] args)
        {
            using (var context = new WMSDbContext())
            {
                var clients = context
                              .Clients
                              .Include(c => c.FirstName)
                              .ToList();


                var mechanic = new Mechanic()
                {
                    FirstName = "Ivan", LastName = "Ivanov", Address = "Ivanqne"
                };
                context.Mechanics.Add(mechanic);

                var jobs = context.Jobs
                           .Select(x => new
                {
                    x.Mechanic.FirstName,
                    x.Orders.Count
                })
                           .ToList();

                foreach (var job in jobs)
                {
                    Console.WriteLine($"{job.FirstName} blah blah {job.Count}");
                }
            }
        }
Esempio n. 2
0
 public DefaultSettingsCreator(WMSDbContext context)
 {
     _context = context;
 }
Esempio n. 3
0
 public HostRoleAndUserCreator(WMSDbContext context)
 {
     _context = context;
 }
 public DefaultLanguagesCreator(WMSDbContext context)
 {
     _context = context;
 }
Esempio n. 5
0
 public DefaultTenantCreator(WMSDbContext context)
 {
     _context = context;
 }
Esempio n. 6
0
 public InitialHostDbBuilder(WMSDbContext context)
 {
     _context = context;
 }
 public DefaultTenantRoleAndUserCreator(WMSDbContext context)
 {
     _context = context;
 }
 public TenantRoleAndUserBuilder(WMSDbContext context, int tenantId)
 {
     _context  = context;
     _tenantId = tenantId;
 }
 public DefaultEditionsCreator(WMSDbContext context)
 {
     _context = context;
 }
Esempio n. 10
0
 public PersonRepository(WMSDbContext thecontext)
 {
     _theContext = thecontext;
 }
Esempio n. 11
0
 public RolRepository(WMSDbContext context)
 {
     _theContext = context;
 }