public static DAL.Indication FromBusinessToDataAccessMap(Indication indication)
        {
            var Indication           = indication ?? throw new ArgumentNullException("indication");
            var dataAccessIndication = new DAL.Indication()
            {
                Id = indication.Id,
                CurrentIndication = indication.CurrentIndication,
                LastIndication    = indication.LastIndication,
                LoosesPercent     = indication.LoosesPercent,
                Month             = indication.Month,
                Year = indication.Year
            };
            var dataAccessPayment = new DAL.Payment()
            {
                Id            = indication.Payment.Id,
                DateOfPayment = indication.Payment.DateOfPayment,
                MemberId      = indication.Payment.MemberId,
                PaidFor       = indication.Payment.PaidFor,
                ToPay         = indication.Payment.ToPay,
                RateId        = indication.Payment.RateId
            };

            dataAccessIndication.Payment = dataAccessPayment;
            return(dataAccessIndication);
        }
        public static Payment FromDataAccessToBusinessMap(DAL.Payment payment)
        {
            var Payment    = payment ?? throw new ArgumentNullException("payment");
            var dTOPayment = new Payment()
            {
                Id            = payment.Id,
                DateOfPayment = payment.DateOfPayment,
                MemberId      = payment.MemberId,
                PaidFor       = payment.PaidFor,
                ToPay         = payment.ToPay,
                RateId        = payment.RateId
            };
            var dTOIndication = new Indication()
            {
                Id = payment.Indication.Id,
                CurrentIndication = payment.Indication.CurrentIndication,
                LastIndication    = payment.Indication.LastIndication,
                LoosesPercent     = payment.Indication.LoosesPercent,
                Month             = payment.Indication.Month,
                Year = payment.Indication.Year
            };
            var dTORate = new Rate()
            {
                Id                    = payment.Rate.Id,
                RateName              = payment.Rate.RateName,
                RateValue             = payment.Rate.RateValue,
                BankCollectionPercent = payment.Rate.BankCollectionPercent,
                Date                  = payment.Rate.Date,
                FinePercent           = payment.Rate.FinePercent
            };
            var dTOMember = new Member()
            {
                Id             = payment.Member.Id,
                FirstName      = payment.Member.FirstName,
                LastName       = payment.Member.LastName,
                MiddleName     = payment.Member.MiddleName,
                AdditionalInfo = payment.Member.AdditionalInfo,
                Address        = payment.Member.Address,
                Phone          = payment.Member.Phone,
                IsActiveMember = payment.Member.IsActiveMember
            };

            dTOPayment.Indication = dTOIndication;
            dTOPayment.Rate       = dTORate;
            dTOPayment.Member     = dTOMember;
            return(dTOPayment);
        }
        public static DAL.Payment FromBusinessToDataAccessMap(Payment payment)
        {
            var Payment           = payment ?? throw new ArgumentNullException("payment");
            var dataAccessPayment = new DAL.Payment()
            {
                Id            = payment.Id,
                DateOfPayment = payment.DateOfPayment,
                MemberId      = payment.MemberId,
                PaidFor       = payment.PaidFor,
                ToPay         = payment.ToPay,
                RateId        = payment.RateId,
                Indication    = new DAL.Indication()
                {
                    Id = payment.Indication.Id,
                    CurrentIndication = payment.Indication.CurrentIndication,
                    LastIndication    = payment.Indication.LastIndication,
                    LoosesPercent     = payment.Indication.LoosesPercent,
                    Month             = payment.Indication.Month,
                    Year = payment.Indication.Year
                }
            };

            return(dataAccessPayment);
        }