Пример #1
0
        public UsersSeeder(IFarmDbContext context, FarmlandsService relatorService) : base(context)
        {
            Entities = new Lazy <IEnumerable <User> >(() => new List <User>
            {
                new User
                {
                    Id        = Guid.NewGuid(),
                    FirstName = "John",
                    LastName  = "Donald"
                },

                new User
                {
                    Id        = Guid.NewGuid(),
                    FirstName = "Sarra",
                    LastName  = "Daniel"
                },

                new User
                {
                    Id        = Guid.NewGuid(),
                    FirstName = "Marc",
                    LastName  = "Subermaniam"
                },
            });

            RelatorService = relatorService;
        }
Пример #2
0
        public EquipmentSeeder(IFarmDbContext context, FarmlandsSeeder relatorService) : base(context)
        {
            Entities = new Lazy <IEnumerable <Equipment> >(() => new List <Equipment>
            {
                new Equipment
                {
                    Id   = Guid.NewGuid(),
                    Name = "IF - SEEDER 731",
                    Type = EquipmentType.Seeder
                },

                new Equipment
                {
                    Id   = Guid.NewGuid(),
                    Name = "IF - SPRAYER 91",
                    Type = EquipmentType.Sprayer
                },

                new Equipment
                {
                    Id   = Guid.NewGuid(),
                    Name = "IF - TRACKTOR 061",
                    Type = EquipmentType.Tracktor
                },
            });

            RelatorService = relatorService;
        }
Пример #3
0
        public FarmlandsSeeder(IFarmDbContext context) : base(context)
        {
            Entities = new Lazy <IEnumerable <Farmland> >(() => new List <Farmland>
            {
                new Farmland
                {
                    Id       = Guid.NewGuid(),
                    Location = "Albera",
                    NbAcres  = 10
                },

                new Farmland
                {
                    Id       = Guid.NewGuid(),
                    Location = "Vancouver",
                    NbAcres  = 8
                },

                new Farmland
                {
                    Id       = Guid.NewGuid(),
                    Location = "Saskatchewan",
                    NbAcres  = 78
                },
            });
        }
Пример #4
0
 public FarmlandsService(IFarmDbContext context) : base(context)
 {
 }
Пример #5
0
 public BaseService(IFarmDbContext context)
 {
     DbContext = context;
     DbSet     = DbContext.Set <T>();
 }
Пример #6
0
 public UsersService(IFarmDbContext context) : base(context)
 {
 }
Пример #7
0
 public BaseSeeder(IFarmDbContext context) : base(context)
 {
 }
Пример #8
0
 public EquipmentsService(IFarmDbContext context) : base(context)
 {
 }