Ejemplo n.º 1
0
 public static ComponentFormViewModel MapToComponentConstantViewModel(this ComponentConstantVersion 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,
         VersionStatusEnum = model.VersionStatusEnum,
         ComponentId = model.ComponentConstantId
     });
 }
 public void AddVer(ComponentConstantVersion component)
 {
     _db.ComponentConstantVersions.Add(component);
     _db.SaveChanges();
 }
 public void UpdateVer(ComponentConstantVersion componentConstantVersion)
 {
     _db.ComponentConstantVersions.Attach(componentConstantVersion);
     _db.Entry(componentConstantVersion).State = EntityState.Modified;
     _db.SaveChanges();
 }