Beispiel #1
0
        public static ContosoUniversity.DAL.SalesModel.Salon ToEntity(this SalonDto source)
        {
            if (source == null)
            {
                return(null);
            }

            var target = new ContosoUniversity.DAL.SalesModel.Salon();

            // Properties
            target.ModelName       = source.ModelName;
            target.BrandId         = source.BrandId;
            target.ManufactureYear = source.ManufactureYear;
            target.Id          = source.Id;
            target.SalonType   = source.SalonType;
            target.description = source.description;

            // User-defined partial method
            OnEntityCreating(source, target);

            return(target);
        }
Beispiel #2
0
        public static SalonDto ToDtoWithRelated(this ContosoUniversity.DAL.SalesModel.Salon source, int level)
        {
            if (source == null)
            {
                return(null);
            }

            var target = new SalonDto();

            // Properties
            target.ModelName       = source.ModelName;
            target.BrandId         = source.BrandId;
            target.ManufactureYear = source.ManufactureYear;
            target.Id          = source.Id;
            target.SalonType   = source.SalonType;
            target.description = source.description;

            // User-defined partial method
            OnDtoCreating(source, target);

            return(target);
        }
Beispiel #3
0
 static partial void OnEntityCreating(SalonDto source, ContosoUniversity.DAL.SalesModel.Salon target);
Beispiel #4
0
 static partial void OnDtoCreating(ContosoUniversity.DAL.SalesModel.Salon source, SalonDto target);