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

            Shoes.Remove(shoe);
        }
예제 #2
0
 public DisplayShoeVM(Shoe shoe)
 {
     Type = shoe.Type;
     Colour = shoe.Color;
     Size = shoe.Size;
     Id = shoe.Id;
     OwnerEmail = shoe.OwnerEmail;
     OrderedOn = shoe.TimeAdded;
 }
예제 #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;
            }
        }
예제 #4
0
 public void Create(Shoe entity)
 {
     Shoes.Add(entity);
 }