Пример #1
0
 /// <summary>
 /// Set a Place data into the database. This function looks into place.Name to determine which place he has to modified. He modifies the others fields
 /// </summary>
 /// <param name="place">The place containing the information to modify, except the name (the name is a key)</param>
 public void SetPlace(Place place)
 {
     m_dbContext.Place.Where(d => d.Name == place.Name).ToList().ForEach(d => d.Story = place.Story);
 }
Пример #2
0
 /// <summary>
 /// Add a place into the database
 /// </summary>
 /// <param name="place">The place to add</param>
 public void AddPlace(Place place)
 {
     m_dbContext.Place.Add(place);
     Commit();
 }