public static ShoppingListItem WithImage(this ShoppingListItem item, string fileName)
 {
     item.Image = new ShoppingListItemImage(fileName, item);
     return(item);
 }
 public OperationResult Post(ShoppingListItem item)
 {
     ShoppingList shoppingList = _shoppingListService.GetShoppingList();
     shoppingList.Add(item);
     return new OperationResult.SeeOther() { RedirectLocation = shoppingList.CreateUri()};
 }
 public ShoppingListItemImage(string filename, ShoppingListItem parent)
 {
     Parent   = parent;
     Filename = filename;
 }
 public OperationResult Post(ShoppingListItem item)
 {
     ShoppingList.Add(item);
     return new OperationResult.SeeOther { RedirectLocation = typeof(ShoppingList).CreateUri() };
 }