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); }
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); }
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); }
public ShirtViewModel() { SingleShirt = new Shirt(); ShirtList = new List <Shirt>(); }