Exemple #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);
        }
Exemple #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);
        }
Exemple #3
0
 static partial void OnEntityCreating(SalonDto source, ContosoUniversity.DAL.SalesModel.Salon target);
Exemple #4
0
 public static SalonDto ToDto(this ContosoUniversity.DAL.SalesModel.Salon source)
 {
     return(source.ToDtoWithRelated(0));
 }
Exemple #5
0
 static partial void OnDtoCreating(ContosoUniversity.DAL.SalesModel.Salon source, SalonDto target);