Esempio n. 1
0
 public VehicleController(IMapper mapper, VegaContext context, IVehicleRepository repository, IUnitOfWork unitOfWork)
 {
     this.mapper     = mapper;
     this.repository = repository;
     this.unitOfWork = unitOfWork;
     this.context    = context;
 }
Esempio n. 2
0
 public void InsertOrUpdate(FabricationOrder fabricationOrder)
 {
     if (fabricationOrder.Id == default(int))
     {
         VegaContext.FabricationOrders.Add(fabricationOrder);
     }
     else
     {
         VegaContext.Entry(fabricationOrder).State = EntityState.Modified;
     }
 }
Esempio n. 3
0
 public void InsertOrUpdate(ImportingInvoice importingInvoice)
 {
     if (importingInvoice.Id == default(int))
     {
         VegaContext.ImportingInvoices.Add(importingInvoice);
     }
     else
     {
         VegaContext.Entry(importingInvoice).State = EntityState.Modified;
     }
 }
Esempio n. 4
0
 public void InsertOrUpdate(UGroupPermission permission)
 {
     if (permission.Id == default(int))
     {
         VegaContext.UGroupPermissions.Add(permission);
     }
     else
     {
         VegaContext.Entry(permission).State = EntityState.Modified;
     }
 }
Esempio n. 5
0
 public void InsertOrUpdate(RawMaterial rawMaterial)
 {
     if (rawMaterial.ID == default(int))
     {
         VegaContext.RawMaterials.Add(rawMaterial);
     }
     else
     {
         VegaContext.Entry(rawMaterial).State = EntityState.Modified;
     }
 }
Esempio n. 6
0
 public UnitOfWork(VegaContext context)
 {
     _context = context;
     this.CountryModelRepository            = new GenericRepository <CountryModel>(_context);
     this.AreaModelRepository               = new GenericRepository <AreaModel>(_context);
     this.AccountModelRepository            = new GenericRepository <AccountModel>(_context);
     this.TransactionModelRepository        = new GenericRepository <TransactionModel>(_context);
     this.LedgerModelRepository             = new GenericRepository <LedgerModel>(_context);
     this.SecurityLoginsRoleModelRepository = new GenericRepository <SecurityLoginsRoleModel>(_context);
     this.SecurityLoginModelRepository      = new GenericRepository <SecurityLoginModel>(_context);
 }
Esempio n. 7
0
 public void InsertOrUpdate(Suplier suplier)
 {
     if (suplier.Id == default(int))
     {
         VegaContext.Supliers.Add(suplier);
     }
     else
     {
         VegaContext.Entry(suplier).State = EntityState.Modified;
     }
 }
 public void InsertOrUpdate(ProgressionCheck progressionCheck)
 {
     if (progressionCheck.ID == default(int))
     {
         VegaContext.ProgressionChecks.Add(progressionCheck);
     }
     else
     {
         VegaContext.Entry(progressionCheck).State = EntityState.Modified;
     }
 }
Esempio n. 9
0
 public void InsertOrUpdate(UGroup uGroup)
 {
     if (uGroup.Id == default(int))
     {
         VegaContext.UGroups.Add(uGroup);
     }
     else
     {
         VegaContext.Entry(uGroup).State = EntityState.Modified;
     }
 }
Esempio n. 10
0
 public void InsertOrUpdate(Component component)
 {
     if (component.Id == default(int))
     {
         VegaContext.Components.Add(component);
     }
     else
     {
         VegaContext.Entry(component).State = EntityState.Modified;
     }
 }
Esempio n. 11
0
 public void InsertOrUpdate(Message message)
 {
     if (message.Id == default(int))
     {
         VegaContext.Messages.Add(message);
     }
     else
     {
         VegaContext.Entry(message).State = EntityState.Modified;
     }
 }
Esempio n. 12
0
 public void InsertOrUpdate(SellingInvoice sellingInvoice)
 {
     if (sellingInvoice.Id == default(int))
     {
         VegaContext.SellingInvoices.Add(sellingInvoice);
     }
     else
     {
         VegaContext.Entry(sellingInvoice).State = EntityState.Modified;
     }
 }
Esempio n. 13
0
 public void InsertOrUpdate(Nomenclature nomenclature)
 {
     if (nomenclature.Id == default(int))
     {
         VegaContext.Nomenclatures.Add(nomenclature);
     }
     else
     {
         VegaContext.Entry(nomenclature).State = EntityState.Modified;
     }
 }
Esempio n. 14
0
 public void InsertOrUpdate(Expence expence)
 {
     if (expence.Id == default(int))
     {
         VegaContext.Expences.Add(expence);
     }
     else
     {
         VegaContext.Entry(expence).State = EntityState.Modified;
     }
 }
Esempio n. 15
0
 public void InsertOrUpdate(Task task)
 {
     if (task.Id == default(int))
     {
         VegaContext.Tasks.Add(task);
     }
     else
     {
         VegaContext.Entry(task).State = EntityState.Modified;
     }
 }
Esempio n. 16
0
 public void InsertOrUpdate(User user)
 {
     if (user.Id == default(int))
     {
         VegaContext.Users.Add(user);
     }
     else
     {
         VegaContext.Entry(user).State = EntityState.Modified;
     }
 }
Esempio n. 17
0
 public void InsertOrUpdate(NomenclatureSequance ns)
 {
     if (ns.ID == default(int))
     {
         VegaContext.NomenclatureSequances.Add(ns);
     }
     else
     {
         VegaContext.Entry(ns).State = EntityState.Modified;
     }
 }
Esempio n. 18
0
 public void InsertOrUpdate(UsedRawMaterial usedRM)
 {
     if (usedRM.Id == default(int))
     {
         VegaContext.UsedRawMaterials.Add(usedRM);
     }
     else
     {
         VegaContext.Entry(usedRM).State = EntityState.Modified;
     }
 }
Esempio n. 19
0
 public void InsertOrUpdate(NColor color)
 {
     if (color.Id == default(int))
     {
         VegaContext.NColors.Add(color);
     }
     else
     {
         VegaContext.Entry(color).State = EntityState.Modified;
     }
 }
Esempio n. 20
0
 public VegaController(VegaContext context)
 {
     _context = context;
     if (_context.Makes.Count() == 0)
     {
         _context.Makes.Add(new Make {
             id = 1, name = "bmw", models = new Collection <Model> {
                 new Model {
                     id = 1, name = "model1"
                 }, new Model {
                     id = 2, name = "model2"
                 }
             }
         });
         _context.Features.Add(new Feature {
             id = 1, name = "feature1"
         });
         _context.Features.Add(new Feature {
             id = 2, name = "Feature2"
         });
         _context.SaveChanges();
     }
 }
Esempio n. 21
0
 public PhotoRepository(VegaContext context)
 {
     this.context = context;
 }
Esempio n. 22
0
 public UserRepository(VegaContext context) : base(context)
 {
 }
Esempio n. 23
0
 public MakeRepository(VegaContext context)
 {
     _context = context;
 }
Esempio n. 24
0
 public GenericRepository(VegaContext _context)
 {
     this._context = _context;
     table         = _context.Set <T>();
 }
Esempio n. 25
0
 public GenericRepository(bool createProxy = true)
 {
     this._context = new VegaContext();
     table         = _context.Set <T>();
 }
Esempio n. 26
0
 public FeatureController(VegaContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Esempio n. 27
0
 public UsedRawMaterialRepository(VegaContext context) : base(context)
 {
 }
Esempio n. 28
0
 public BrandController(VegaContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Esempio n. 29
0
 public VehicleRepository(VegaContext context)
 {
     this.context = context;
 }
Esempio n. 30
0
 public MakesController(VegaContext context, IMapper mapper)
 {
     this.mapper = mapper;
     _context    = context;
 }