Beispiel #1
0
        public ShirtsDAO Map(Shirt _shirtToUpdate)
        {
            ShirtsDAO _ShirtToUpdate = new ShirtsDAO();

            _ShirtToUpdate.ShirtsID   = _shirtToUpdate.ShirtsID;
            _ShirtToUpdate.Size       = _shirtToUpdate.Size;
            _ShirtToUpdate.Color      = _shirtToUpdate.Color;
            _ShirtToUpdate.ShirtPrice = _shirtToUpdate.ShirtPrice;
            return(_ShirtToUpdate);
        }
Beispiel #2
0
        public Shirt Map(ShirtsDAO shirtToCreate)
        {
            Shirt daShirtToCreate = new Shirt();

            daShirtToCreate.ShirtsID   = shirtToCreate.ShirtsID;
            daShirtToCreate.Size       = shirtToCreate.Size;
            daShirtToCreate.Color      = shirtToCreate.Color;
            daShirtToCreate.ShirtPrice = shirtToCreate.ShirtPrice;

            return(daShirtToCreate);
        }
Beispiel #3
0
        public List <Shirt> Map(List <ShirtsDAO> ShirtListToMap)
        {
            List <Shirt> ShirtListToReturn = new List <Shirt>();

            foreach (ShirtsDAO ShirtToMap in ShirtListToMap)
            {
                Shirt ShirtViewModel = new Shirt();
                ShirtViewModel.ShirtsID   = ShirtToMap.ShirtsID;
                ShirtViewModel.Size       = ShirtToMap.Size;
                ShirtViewModel.Color      = ShirtToMap.Color;
                ShirtViewModel.ShirtPrice = ShirtToMap.ShirtPrice;
                ShirtListToReturn.Add(ShirtViewModel);
            }
            return(ShirtListToReturn);
        }
Beispiel #4
0
 public ShirtViewModel()
 {
     SingleShirt = new Shirt();
     ShirtList   = new List <Shirt>();
 }