Example #1
0
        private static void SeedVehicleFeatureRequest(ApplicationDbContext dbContext)
        {
            for (int i = 1; i < 25; i++)
            {
                var vehicleFeatureRequest = new VehicleFeatureRequest
                {
                    RequestId        = i,
                    VehicleFeatureId = 1
                };

                dbContext.Add(vehicleFeatureRequest);
            }
            dbContext.SaveChanges();
        }
        public async Task <int> CreateVehicleFeatureRequest(int requestId, int vehicleFeatureId)
        {
            var featureEnity = new VehicleFeatureRequest()
            {
                RequestId        = requestId,
                VehicleFeatureId = vehicleFeatureId
            };

            _repository.Create(featureEnity);

            await _uow.SaveChangesAsync();

            return(featureEnity.Id);
        }