public static ContosoUniversity.DAL.SalesModel.SUV ToEntity(this SUVDto source) { if (source == null) { return(null); } var target = new ContosoUniversity.DAL.SalesModel.SUV(); // Properties target.ModelName = source.ModelName; target.BrandId = source.BrandId; target.ManufactureYear = source.ManufactureYear; target.Id = source.Id; target.SuvType = source.SuvType; // User-defined partial method OnEntityCreating(source, target); return(target); }
public static SUVDto ToDtoWithRelated(this ContosoUniversity.DAL.SalesModel.SUV source, int level) { if (source == null) { return(null); } var target = new SUVDto(); // Properties target.ModelName = source.ModelName; target.BrandId = source.BrandId; target.ManufactureYear = source.ManufactureYear; target.Id = source.Id; target.SuvType = source.SuvType; // User-defined partial method OnDtoCreating(source, target); return(target); }
static partial void OnEntityCreating(SUVDto source, ContosoUniversity.DAL.SalesModel.SUV target);
public static SUVDto ToDto(this ContosoUniversity.DAL.SalesModel.SUV source) { return(source.ToDtoWithRelated(0)); }
static partial void OnDtoCreating(ContosoUniversity.DAL.SalesModel.SUV source, SUVDto target);