Beispiel #1
0
        public List <ModelBrands> Map(List <DataBrands> allBrands) //it takes in data does something and returns //void does stuff but doesnt return anything
        {
            List <ModelBrands> returnBrands = new List <ModelBrands>();

            foreach (DataBrands dBrands in allBrands)
            {
                ModelBrands brands = new ModelBrands();
                brands.BrandID         = dBrands.BrandID;
                brands.BrandName       = dBrands.BrandName;
                brands.BrandCreateDate = dBrands.BrandCreateDate;
                brands.BrandPhotoURL   = dBrands.BrandPhotoURL;
                brands.WebsiteURL      = dBrands.WebsiteURL;

                returnBrands.Add(brands);
            }
            return(returnBrands);
        }
Beispiel #2
0
 public BrandsViewModel()//CONSTURCTOR
 {
     SingleBrand = new ModelBrands();
     AllBrands   = new List <ModelBrands>();
 }