public void CreateVehicleModel(IVehicleModel model) { var vehicleMake = context.VehicleMakes.First(c => c.Id == model.MakeId); vehicleMake.VehicleModels.Add(AutoMapper.Mapper.Map <VehicleModel>(model)); context.SaveChanges(); }
public void CreateVehicleMake(IVehicleMake make) { context.VehicleMakes.Add(AutoMapper.Mapper.Map <VehicleMake>(make)); context.SaveChanges(); }