public void Insert(RestaurantEntity restaurant) { try { var operation = TableOperation.Insert(restaurant); var result = _table.Execute(operation); } catch (Exception ex) { Debug.WriteLine(ex.Message); } }
public void InsertRestaurant(string postCode, RestaurantEntity entity) { try { var operation = TableOperation.Insert(new SearchEntity { PartitionKey = postCode, Category = entity.FoodType, RestaurantAddress = entity.Address, RestaurantLogo = entity.LogoUrl, RowKey = entity.RowKey, Rating = entity.FakeRating, NumberOfVotes = entity.FakeNumVotes }); _table.Execute(operation); } catch (Exception e) { Console.WriteLine(e); } }