public static ActivityVMForCreateEdit MapToSectorGrowthVM(this SectorGrowthRate x) { ActivityVMForCreateEdit activityVMForCreateEdit = new ActivityVMForCreateEdit() { Id = x.Id, DFIndicatorId = x.DFIndicatorId, DFQuarterId = x.DFQuarterId, DFSectorId = x.DFSectorId, DFSourceId = x.DFSourceId, DFUnitId = x.DFUnitId, DFYearId = x.DFYearId, BusinessServices = x.BusinessServices, Communication = x.Communication, Construction = x.Construction, Education = x.Education, GeneralGovernment = x.GeneralGovernment, Health = x.Health, Information = x.Information, ManufacturingIndustries = x.ManufacturingIndustries, OtherServices = x.OtherServices, RealEstateOwnership = x.RealEstateOwnership, AccommodationAndFoodServiceActivities = x.AccommodationAndFoodServiceActivities, AgricultureForestryFishing = x.AgricultureForestryFishing, Electricity = x.Electricity, FinancialIntermediariesAuxiliaryServices = x.FinancialIntermediariesAuxiliaryServices, Gas = x.Gas, IsDeleted = x.IsDeleted, MiningQuarrying = x.MiningQuarrying, OtherExtraction = x.OtherExtraction, OtherManufacturing = x.OtherManufacturing, Petroleum = x.Petroleum, petroleumRefining = x.petroleumRefining, RealEstateActivitie = x.RealEstateActivitie, SocialSecurityAndInsurance = x.SocialSecurityAndInsurance, SocialServices = x.SocialServices, SuezcCanal = x.SuezcCanal, TotalGDPAtFactorCost = x.TotalGDPAtFactorCost, TransportationAndStorage = x.TransportationAndStorage, WaterSewerageRemediationActivitie = x.WaterSewerageRemediationActivitie, WholesaleAndRetailTrade = x.WholesaleAndRetailTrade, ActivityCurrentId = x.Id }; return(activityVMForCreateEdit); }
public void Update(SectorGrowthRate sectorGrowthRate) { _db.SectorGrowthRates.Attach(sectorGrowthRate); _db.Entry(sectorGrowthRate).State = EntityState.Modified; _db.SaveChanges(); }
public void Add(SectorGrowthRate sectorGrowthRate) { _db.SectorGrowthRates.Add(sectorGrowthRate); _db.SaveChanges(); }