public static ComponentFormViewModel MapToComponentCurrentViewModel(this ComponentCurrentVersion model) { return(new ComponentFormViewModel() { Id = model.Id, DFIndicatorId = model.DFIndicatorId, DFSourceId = model.DFSourceId, DFYearFiscalId = model.DFYearFiscalId, DFUnitId = model.DFUnitId, DFQuarterId = model.DFQuarterId, IsDeleted = model.IsDeleted, ExportsOfGoodsAndServices = model.ExportsOfGoodsAndServices, GovernmentConsumption = model.GovernmentConsumption, GrossCapitalFormation = model.GrossCapitalFormation, ImportsOfGoodsAndServices = model.ImportsOfGoodsAndServices, PrivateConsumption = model.PrivateConsumption, TotalGrossDomesticProductAtMarketPrices = model.TotalGrossDomesticProductAtMarketPrices, ChangeActionEnum = model.ChangeActionEnum, ComponentId = model.ComponentCurrentId, VersionStatusEnum = model.VersionStatusEnum }); }
public void AddVer(ComponentCurrentVersion componentCurrentVersion) { _db.ComponentCurrentVersions.Add(componentCurrentVersion); _db.SaveChanges(); }
public void UpdateVer(ComponentCurrentVersion componentCurrentVersionModel) { _db.ComponentCurrentVersions.Update(componentCurrentVersionModel); _db.SaveChanges(); }