///////////////////////////////////////////////////
        /// RequestForConfirmation
        ///////////////////////////////////////////////////
        public tb_naesb_transaction_master Map(Nomination.Domain.RequestForConfirmation.RequestForConfirmation obj)
        {
            if (obj != null)
            {
                return(new tb_naesb_transaction_master
                {
                    FileType = "RFC",
                    //PipelineCd = new NaesbPipelineRepository().GetByPipelineEntityID(obj.PartyIndentificaton.PipelineEntityId)?.Pipeline,
                    //CompanyCd = new NaesbUtilityRepository().GetByUtilityEntityId(obj.PartyIndentificaton.UtilityEntityId)?.Utility,
                    PipelineCd = obj.PartyIndentificaton.PipelineEntity,
                    CompanyCd = obj.PartyIndentificaton.UtilityEntity,
                    GasDay = obj.GasDay,
                    CycleCd = obj.Cycle,
                    ConfirmingEntityId = obj.PartyIndentificaton.PipelineEntity,
                    UtilityEntityId = obj.PartyIndentificaton.UtilityEntity,
                    TransportationId = obj.PurchaseOrderNumber,
                    //TransportationId = null,
                    NomCycleStart = DateTime.ParseExact(obj.GasDayStart, "yyyyMMddHHmm", null),
                    NomcycleEnd = DateTime.ParseExact(obj.GasDayEnd, "yyyyMMddHHmm", null),
                    TransactionTime = DateTime.Now,
                    row_lst_upd_userid = UserId,
                    tb_naesb_transaction_detail = Map(obj.Locations)
                });
            }

            return(null);
        }
        /////////////////////////////////////////////////////////////////////////////////////
        /// Map RequestForConfirmation DTO from database to Domain RequestForConfirmation
        /////////////////////////////////////////////////////////////////////////////////////
        public Nomination.Domain.RequestForConfirmation.RequestForConfirmation Map(Nomination.Persistence.RequestForConfirmation.Dto.RequestForConfirmation obj)
        {
            if (obj != null)
            {
                Nomination.Domain.RequestForConfirmation.RequestForConfirmation item =
                    new Nomination.Domain.RequestForConfirmation.RequestForConfirmation
                {
                    PurchaseOrderNumber = obj.PurchaseOrderNumber,
                    GasDay              = DateTime.ParseExact(obj.GasDay, "yyyyMMdd", null),
                    GasDayStart         = obj.GasDayStart,
                    GasDayEnd           = obj.GasDayEnd,
                    Cycle               = obj.Cycle,
                    PartyIndentificaton = Map(obj.PartyIndentificaton),
                    Locations           = obj.Locations.Select(Map).ToList()
                };

                return(item);
            }

            return(null);
        }