Example #1
0
        public async Task <ActionResult> Post([FromBody] Core.Earnings value)
        {
            await this._repository.UpdateAsync(value);

            await _context.SaveChangesAsync();

            AddCacheValue <Core.Earnings>(baseKey + value.UNITID, value);

            return(Ok());
        }
Example #2
0
        public static Data.Model.Earnings ToDataObject(this Core.Earnings core)
        {
            var data = new Data.Model.Earnings();

            data.Unitid                 = core.UNITID;
            data.CountEd                = core.COUNT_ED;
            data.CountNwneP10           = core.COUNT_NWNE_P10;
            data.CountWneP10            = core.COUNT_WNE_P10;
            data.MnEarnWneP10           = core.MN_EARN_WNE_P10;
            data.MdEarnWneP10           = core.MD_EARN_WNE_P10;
            data.Pct10EarnWneP10        = core.PCT10_EARN_WNE_P10;
            data.Pct25EarnWneP10        = core.PCT25_EARN_WNE_P10;
            data.Pct75EarnWneP10        = core.PCT75_EARN_WNE_P10;
            data.Pct90EarnWneP10        = core.PCT90_EARN_WNE_P10;
            data.SdEarnWneP10           = core.SD_EARN_WNE_P10;
            data.CountWneInc1P10        = core.COUNT_WNE_INC1_P10;
            data.CountWneInc2P10        = core.COUNT_WNE_INC2_P10;
            data.CountWneInc3P10        = core.COUNT_WNE_INC3_P10;
            data.CountWneIndep0Inc1P10  = core.COUNT_WNE_INDEP0_INC1_P10;
            data.CountWneIndep0P10      = core.COUNT_WNE_INDEP0_P10;
            data.CountWneIndep1P10      = core.COUNT_WNE_INDEP1_P10;
            data.CountWneMale0P10       = core.COUNT_WNE_MALE0_P10;
            data.CountWneMale1P10       = core.COUNT_WNE_MALE1_P10;
            data.Gt25kP10               = core.GT_25K_P10;
            data.Gt28kP10               = core.GT_28K_P10;
            data.MnEarnWneInc1P10       = core.MN_EARN_WNE_INC1_P10;
            data.MnEarnWneInc2P10       = core.MN_EARN_WNE_INC2_P10;
            data.MnEarnWneInc3P10       = core.MN_EARN_WNE_INC3_P10;
            data.MnEarnWneIndep0Inc1P10 = core.MN_EARN_WNE_INDEP0_INC1_P10;
            data.MnEarnWneIndep0P10     = core.MN_EARN_WNE_INDEP0_P10;
            data.MnEarnWneIndep1P10     = core.MN_EARN_WNE_INDEP1_P10;
            data.MnEarnWneMale0P10      = core.MN_EARN_WNE_MALE0_P10;
            data.MnEarnWneMale1P10      = core.MN_EARN_WNE_MALE1_P10;
            data.CountNwneP6            = core.COUNT_NWNE_P6;
            data.CountWneP6             = core.COUNT_WNE_P6;
            data.MnEarnWneP6            = core.MN_EARN_WNE_P6;
            data.MdEarnWneP6            = core.MD_EARN_WNE_P6;
            data.Pct10EarnWneP6         = core.PCT10_EARN_WNE_P6;
            data.Pct25EarnWneP6         = core.PCT25_EARN_WNE_P6;
            data.Pct75EarnWneP6         = core.PCT75_EARN_WNE_P6;
            data.Pct90EarnWneP6         = core.PCT90_EARN_WNE_P6;
            data.SdEarnWneP6            = core.SD_EARN_WNE_P6;
            data.CountWneInc1P6         = core.COUNT_WNE_INC1_P6;
            data.CountWneInc2P6         = core.COUNT_WNE_INC2_P6;
            data.CountWneInc3P6         = core.COUNT_WNE_INC3_P6;
            data.CountWneIndep0Inc1P6   = core.COUNT_WNE_INDEP0_INC1_P6;
            data.CountWneIndep0P6       = core.COUNT_WNE_INDEP0_P6;
            data.CountWneIndep1P6       = core.COUNT_WNE_INDEP1_P6;
            data.CountWneMale0P6        = core.COUNT_WNE_MALE0_P6;
            data.CountWneMale1P6        = core.COUNT_WNE_MALE1_P6;
            data.Gt25kP6                = core.GT_25K_P6;
            data.Gt28kP6                = core.GT_28K_P6;
            data.MnEarnWneInc1P6        = core.MN_EARN_WNE_INC1_P6;
            data.MnEarnWneInc2P6        = core.MN_EARN_WNE_INC2_P6;
            data.MnEarnWneInc3P6        = core.MN_EARN_WNE_INC3_P6;
            data.MnEarnWneIndep0Inc1P6  = core.MN_EARN_WNE_INDEP0_INC1_P6;
            data.MnEarnWneIndep0P6      = core.MN_EARN_WNE_INDEP0_P6;
            data.MnEarnWneIndep1P6      = core.MN_EARN_WNE_INDEP1_P6;
            data.MnEarnWneMale0P6       = core.MN_EARN_WNE_MALE0_P6;
            data.MnEarnWneMale1P6       = core.MN_EARN_WNE_MALE1_P6;
            data.CountNwneP7            = core.COUNT_NWNE_P7;
            data.CountWneP7             = core.COUNT_WNE_P7;
            data.MnEarnWneP7            = core.MN_EARN_WNE_P7;
            data.SdEarnWneP7            = core.SD_EARN_WNE_P7;
            data.Gt25kP7                = core.GT_25K_P7;
            data.CountNwneP8            = core.COUNT_NWNE_P8;
            data.CountWneP8             = core.COUNT_WNE_P8;
            data.MnEarnWneP8            = core.MN_EARN_WNE_P8;
            data.MdEarnWneP8            = core.MD_EARN_WNE_P8;
            data.Pct10EarnWneP8         = core.PCT10_EARN_WNE_P8;
            data.Pct25EarnWneP8         = core.PCT25_EARN_WNE_P8;
            data.Pct75EarnWneP8         = core.PCT75_EARN_WNE_P8;
            data.Pct90EarnWneP8         = core.PCT90_EARN_WNE_P8;
            data.SdEarnWneP8            = core.SD_EARN_WNE_P8;
            data.Gt25kP8                = core.GT_25K_P8;
            data.Gt28kP8                = core.GT_28K_P8;
            data.CountNwneP9            = core.COUNT_NWNE_P9;
            data.CountWneP9             = core.COUNT_WNE_P9;
            data.MnEarnWneP9            = core.MN_EARN_WNE_P9;
            data.SdEarnWneP9            = core.SD_EARN_WNE_P9;
            data.Gt25kP9                = core.GT_25K_P9;
            return(data);
        }
Example #3
0
        public static Core.Earnings ToTransferObject(this Data.Model.Earnings data)
        {
            var core = new Core.Earnings();

            core.UNITID                      = data.Unitid;
            core.COUNT_ED                    = data.CountEd;
            core.COUNT_NWNE_P10              = data.CountNwneP10;
            core.COUNT_WNE_P10               = data.CountWneP10;
            core.MN_EARN_WNE_P10             = data.MnEarnWneP10;
            core.MD_EARN_WNE_P10             = data.MdEarnWneP10;
            core.PCT10_EARN_WNE_P10          = data.Pct10EarnWneP10;
            core.PCT25_EARN_WNE_P10          = data.Pct25EarnWneP10;
            core.PCT75_EARN_WNE_P10          = data.Pct75EarnWneP10;
            core.PCT90_EARN_WNE_P10          = data.Pct90EarnWneP10;
            core.SD_EARN_WNE_P10             = data.SdEarnWneP10;
            core.COUNT_WNE_INC1_P10          = data.CountWneInc1P10;
            core.COUNT_WNE_INC2_P10          = data.CountWneInc2P10;
            core.COUNT_WNE_INC3_P10          = data.CountWneInc3P10;
            core.COUNT_WNE_INDEP0_INC1_P10   = data.CountWneIndep0Inc1P10;
            core.COUNT_WNE_INDEP0_P10        = data.CountWneIndep0P10;
            core.COUNT_WNE_INDEP1_P10        = data.CountWneIndep1P10;
            core.COUNT_WNE_MALE0_P10         = data.CountWneMale0P10;
            core.COUNT_WNE_MALE1_P10         = data.CountWneMale1P10;
            core.GT_25K_P10                  = data.Gt25kP10;
            core.GT_28K_P10                  = data.Gt28kP10;
            core.MN_EARN_WNE_INC1_P10        = data.MnEarnWneInc1P10;
            core.MN_EARN_WNE_INC2_P10        = data.MnEarnWneInc2P10;
            core.MN_EARN_WNE_INC3_P10        = data.MnEarnWneInc3P10;
            core.MN_EARN_WNE_INDEP0_INC1_P10 = data.MnEarnWneIndep0Inc1P10;
            core.MN_EARN_WNE_INDEP0_P10      = data.MnEarnWneIndep0P10;
            core.MN_EARN_WNE_INDEP1_P10      = data.MnEarnWneIndep1P10;
            core.MN_EARN_WNE_MALE0_P10       = data.MnEarnWneMale0P10;
            core.MN_EARN_WNE_MALE1_P10       = data.MnEarnWneMale1P10;
            core.COUNT_NWNE_P6               = data.CountNwneP6;
            core.COUNT_WNE_P6                = data.CountWneP6;
            core.MN_EARN_WNE_P6              = data.MnEarnWneP6;
            core.MD_EARN_WNE_P6              = data.MdEarnWneP6;
            core.PCT10_EARN_WNE_P6           = data.Pct10EarnWneP6;
            core.PCT25_EARN_WNE_P6           = data.Pct25EarnWneP6;
            core.PCT75_EARN_WNE_P6           = data.Pct75EarnWneP6;
            core.PCT90_EARN_WNE_P6           = data.Pct90EarnWneP6;
            core.SD_EARN_WNE_P6              = data.SdEarnWneP6;
            core.COUNT_WNE_INC1_P6           = data.CountWneInc1P6;
            core.COUNT_WNE_INC2_P6           = data.CountWneInc2P6;
            core.COUNT_WNE_INC3_P6           = data.CountWneInc3P6;
            core.COUNT_WNE_INDEP0_INC1_P6    = data.CountWneIndep0Inc1P6;
            core.COUNT_WNE_INDEP0_P6         = data.CountWneIndep0P6;
            core.COUNT_WNE_INDEP1_P6         = data.CountWneIndep1P6;
            core.COUNT_WNE_MALE0_P6          = data.CountWneMale0P6;
            core.COUNT_WNE_MALE1_P6          = data.CountWneMale1P6;
            core.GT_25K_P6                   = data.Gt25kP6;
            core.GT_28K_P6                   = data.Gt28kP6;
            core.MN_EARN_WNE_INC1_P6         = data.MnEarnWneInc1P6;
            core.MN_EARN_WNE_INC2_P6         = data.MnEarnWneInc2P6;
            core.MN_EARN_WNE_INC3_P6         = data.MnEarnWneInc3P6;
            core.MN_EARN_WNE_INDEP0_INC1_P6  = data.MnEarnWneIndep0Inc1P6;
            core.MN_EARN_WNE_INDEP0_P6       = data.MnEarnWneIndep0P6;
            core.MN_EARN_WNE_INDEP1_P6       = data.MnEarnWneIndep1P6;
            core.MN_EARN_WNE_MALE0_P6        = data.MnEarnWneMale0P6;
            core.MN_EARN_WNE_MALE1_P6        = data.MnEarnWneMale1P6;
            core.COUNT_NWNE_P7               = data.CountNwneP7;
            core.COUNT_WNE_P7                = data.CountWneP7;
            core.MN_EARN_WNE_P7              = data.MnEarnWneP7;
            core.SD_EARN_WNE_P7              = data.SdEarnWneP7;
            core.GT_25K_P7                   = data.Gt25kP7;
            core.COUNT_NWNE_P8               = data.CountNwneP8;
            core.COUNT_WNE_P8                = data.CountWneP8;
            core.MN_EARN_WNE_P8              = data.MnEarnWneP8;
            core.MD_EARN_WNE_P8              = data.MdEarnWneP8;
            core.PCT10_EARN_WNE_P8           = data.Pct10EarnWneP8;
            core.PCT25_EARN_WNE_P8           = data.Pct25EarnWneP8;
            core.PCT75_EARN_WNE_P8           = data.Pct75EarnWneP8;
            core.PCT90_EARN_WNE_P8           = data.Pct90EarnWneP8;
            core.SD_EARN_WNE_P8              = data.SdEarnWneP8;
            core.GT_25K_P8                   = data.Gt25kP8;
            core.GT_28K_P8                   = data.Gt28kP8;
            core.COUNT_NWNE_P9               = data.CountNwneP9;
            core.COUNT_WNE_P9                = data.CountWneP9;
            core.MN_EARN_WNE_P9              = data.MnEarnWneP9;
            core.SD_EARN_WNE_P9              = data.SdEarnWneP9;
            core.GT_25K_P9                   = data.Gt25kP9;
            return(core);
        }