Esempio n. 1
0
        /// <summary>
        /// Creates an instance of HealthLogEntry class and saves it in database.
        /// </summary>
        /// <returns>Empty HealthLogEntry instance with filled Id property.</returns>
        private HealthLogEntry createEntryAndSaveInDB()
        {
            var entryCollection = ServerConnection.GetCollection <HealthLogEntry>();
            var healthEntry     = new HealthLogEntry();

            healthEntry.AppointmentTime = DateTime.Now;
            entryCollection.Save <HealthLogEntry>(healthEntry);
            return(healthEntry);
        }
Esempio n. 2
0
 /// <summary>
 /// Creates an instance of HealthLogEntry class and saves it in database.
 /// </summary>
 /// <returns>Empty HealthLogEntry instance with filled Id property.</returns>
 private HealthLogEntry createEntryAndSaveInDB()
 {
     var entryCollection = ServerConnection.GetCollection<HealthLogEntry>();
     var healthEntry = new HealthLogEntry();
     healthEntry.AppointmentTime = DateTime.Now;
     entryCollection.Save<HealthLogEntry>(healthEntry);
     return healthEntry;
 }