Esempio n. 1
0
        public void Delete(Shoe entity)
        {
            var shoe = (from s in Shoes
                        where s.Id == entity.Id
                        select s).First();

            Shoes.Remove(shoe);
        }
Esempio n. 2
0
 public DisplayShoeVM(Shoe shoe)
 {
     Type = shoe.Type;
     Colour = shoe.Color;
     Size = shoe.Size;
     Id = shoe.Id;
     OwnerEmail = shoe.OwnerEmail;
     OrderedOn = shoe.TimeAdded;
 }
Esempio n. 3
0
        public void Update(Shoe entity)
        {
            var shoe = (from s in Shoes
                        where s.Id == entity.Id
                        select s).First();

            if (shoe != null)
            {
                shoe.Color = entity.Color;
                shoe.Type = entity.Type;
                shoe.Size = entity.Size;
                shoe.OwnerEmail = entity.OwnerEmail;
            }
        }
Esempio n. 4
0
 public void Create(Shoe entity)
 {
     Shoes.Add(entity);
 }