public void Insert(User user) { using (SQLiteDBContext dbConnection = this.OpenConnection()) { dbConnection.User.Add(user); dbConnection.SaveChanges(); } }
public void InsertActivity(Activity activity) { using (SQLiteDBContext dbConnection = this.OpenConnection()) { dbConnection.Activity.Add(activity); dbConnection.SaveChanges(); } }
public void Insert(Customer customer) { using (SQLiteDBContext dbConnection = this.OpenConnection()) { dbConnection.Customer.Add(customer); dbConnection.SaveChanges(); } }
public void Log(LogType logType, string message) { using (SQLiteDBContext dbConnection = this.OpenConnection()) { Log newLog = new Log(); newLog.Type = logType; newLog.Message = message; newLog.Timestamp = DateTime.UtcNow.Ticks; dbConnection.Log.Add(newLog); dbConnection.SaveChanges(); } }