public static Subscription ConvertFromDTO(SubscriptionDTO subscriptionDTO)
        {
            Subscription subscription = new Subscription();

            subscription.Id            = subscriptionDTO.Id;
            subscription.Name          = subscriptionDTO.Name;
            subscription.Price         = subscriptionDTO.Price;
            subscription.WeeksNum      = subscriptionDTO.WeeksNum;
            subscription.DaysInWeekNum = subscriptionDTO.DaysInWeekNum;

            return(subscription);
        }
Exemplo n.º 2
0
        public static Subscription ConvertFromDTO(SubscriptionDTO subscriptionDTO)
        {
            Subscription subscription = new Subscription();

            if (subscriptionDTO.Id != default)
            {
                subscription.Id = subscriptionDTO.Id;
            }
            subscription.Name          = subscriptionDTO.Name;
            subscription.Price         = subscriptionDTO.Price;
            subscription.WeeksNum      = subscriptionDTO.WeeksNum;
            subscription.DaysInWeekNum = subscriptionDTO.DaysInWeekNum;
            subscription.LessonKind    = subscriptionDTO.LessonKind;
            subscription.StudensKind   = subscriptionDTO.StudensKind;
            return(subscription);
        }