Пример #1
0
 public void UpdateVehicleModel(VehicleModel model)
 {
     throw new NotImplementedException();
 }
Пример #2
0
 public void UpdateVehicleModel(VehicleModel vehicleModel)
 {
     db.Set <VehicleModel>().AddOrUpdate(Mapper.Map <VehicleModel>(vehicleModel));
     db.SaveChanges();
 }
Пример #3
0
 public void InsertVehicleModel(VehicleModel model)
 {
     throw new NotImplementedException();
 }
Пример #4
0
 public bool AddModel(VehicleModel model)
 {
     context.Models.Add(model);
     return(Convert.ToBoolean(context.SaveChanges()));
 }
Пример #5
0
 public void CreateVehicleModel(VehicleModel vehicleModel)
 {
     db.VehicleModel.Add(Mapper.Map <VehicleModel>(vehicleModel));
     db.SaveChanges();
 }
Пример #6
0
 public void Edit(VehicleModel vehicleModel)
 {
     this.db.Entry(vehicleModel).State = EntityState.Modified;
     this.db.SaveChanges();
 }
Пример #7
0
        public VehicleModelVM FindVehicleModel(Guid id)
        {
            VehicleModel vehicleModel = db.VehicleModels.Find(id);

            return(Mapper.Map <VehicleModelVM>(vehicleModel));
        }
Пример #8
0
        public async Task <VehicleModel> UpdateAsync(VehicleModel updatedItem)
        {
            var updatedItemEntity = await repository.UpdateAsync(mapper.Map <VehicleModelEntity>(updatedItem));

            return(mapper.Map <VehicleModel>(updatedItemEntity));
        }
Пример #9
0
 public async Task UpdateAsync(VehicleModel vehicleModel)
 {
     await _repository.UpdateAsync(vehicleModel);
 }
Пример #10
0
 public async Task InsertAsync(VehicleModel vehicleModel)
 {
     await _repository.InsertAsync(vehicleModel);
 }