public VehicleController(IMapper mapper, VegaContext context, IVehicleRepository repository, IUnitOfWork unitOfWork) { this.mapper = mapper; this.repository = repository; this.unitOfWork = unitOfWork; this.context = context; }
public void InsertOrUpdate(FabricationOrder fabricationOrder) { if (fabricationOrder.Id == default(int)) { VegaContext.FabricationOrders.Add(fabricationOrder); } else { VegaContext.Entry(fabricationOrder).State = EntityState.Modified; } }
public void InsertOrUpdate(ImportingInvoice importingInvoice) { if (importingInvoice.Id == default(int)) { VegaContext.ImportingInvoices.Add(importingInvoice); } else { VegaContext.Entry(importingInvoice).State = EntityState.Modified; } }
public void InsertOrUpdate(UGroupPermission permission) { if (permission.Id == default(int)) { VegaContext.UGroupPermissions.Add(permission); } else { VegaContext.Entry(permission).State = EntityState.Modified; } }
public void InsertOrUpdate(RawMaterial rawMaterial) { if (rawMaterial.ID == default(int)) { VegaContext.RawMaterials.Add(rawMaterial); } else { VegaContext.Entry(rawMaterial).State = EntityState.Modified; } }
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); }
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; } }
public void InsertOrUpdate(UGroup uGroup) { if (uGroup.Id == default(int)) { VegaContext.UGroups.Add(uGroup); } else { VegaContext.Entry(uGroup).State = EntityState.Modified; } }
public void InsertOrUpdate(Component component) { if (component.Id == default(int)) { VegaContext.Components.Add(component); } else { VegaContext.Entry(component).State = EntityState.Modified; } }
public void InsertOrUpdate(Message message) { if (message.Id == default(int)) { VegaContext.Messages.Add(message); } else { VegaContext.Entry(message).State = EntityState.Modified; } }
public void InsertOrUpdate(SellingInvoice sellingInvoice) { if (sellingInvoice.Id == default(int)) { VegaContext.SellingInvoices.Add(sellingInvoice); } else { VegaContext.Entry(sellingInvoice).State = EntityState.Modified; } }
public void InsertOrUpdate(Nomenclature nomenclature) { if (nomenclature.Id == default(int)) { VegaContext.Nomenclatures.Add(nomenclature); } else { VegaContext.Entry(nomenclature).State = EntityState.Modified; } }
public void InsertOrUpdate(Expence expence) { if (expence.Id == default(int)) { VegaContext.Expences.Add(expence); } else { VegaContext.Entry(expence).State = EntityState.Modified; } }
public void InsertOrUpdate(Task task) { if (task.Id == default(int)) { VegaContext.Tasks.Add(task); } else { VegaContext.Entry(task).State = EntityState.Modified; } }
public void InsertOrUpdate(User user) { if (user.Id == default(int)) { VegaContext.Users.Add(user); } else { VegaContext.Entry(user).State = EntityState.Modified; } }
public void InsertOrUpdate(NomenclatureSequance ns) { if (ns.ID == default(int)) { VegaContext.NomenclatureSequances.Add(ns); } else { VegaContext.Entry(ns).State = EntityState.Modified; } }
public void InsertOrUpdate(UsedRawMaterial usedRM) { if (usedRM.Id == default(int)) { VegaContext.UsedRawMaterials.Add(usedRM); } else { VegaContext.Entry(usedRM).State = EntityState.Modified; } }
public void InsertOrUpdate(NColor color) { if (color.Id == default(int)) { VegaContext.NColors.Add(color); } else { VegaContext.Entry(color).State = EntityState.Modified; } }
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(); } }
public PhotoRepository(VegaContext context) { this.context = context; }
public UserRepository(VegaContext context) : base(context) { }
public MakeRepository(VegaContext context) { _context = context; }
public GenericRepository(VegaContext _context) { this._context = _context; table = _context.Set <T>(); }
public GenericRepository(bool createProxy = true) { this._context = new VegaContext(); table = _context.Set <T>(); }
public FeatureController(VegaContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public UsedRawMaterialRepository(VegaContext context) : base(context) { }
public BrandController(VegaContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public VehicleRepository(VegaContext context) { this.context = context; }
public MakesController(VegaContext context, IMapper mapper) { this.mapper = mapper; _context = context; }