/// <summary> /// Stores the given login credentials to the backing data store /// </summary> /// <param name="loginCredentials">The login credentials to save</param> /// <returns>Returns a task that will finish once the save is complete</returns> public async Task SaveLoginCredentialsAsync(LoginCredentialsDataModel loginCredentials) { // Clear all entries mDbContext.LoginCredentials.RemoveRange(mDbContext.LoginCredentials); // Add new one mDbContext.LoginCredentials.Add(loginCredentials); // Save changes await mDbContext.SaveChangesAsync(); }
/// <summary> /// Stores the given login credentials to the backing data store /// </summary> /// <param name="loginCredentials">The login credentials to save</param> /// <returns>Returns a task that will finish once the save is complete</returns> public async Task SaveLoginCredentialsAsync(LoginCredentialsDataModel loginCredentials) { // TODO: Replace with stored procedure/Transactions // Clear all entries mDbContext.LoginCredentials.RemoveRange(mDbContext.LoginCredentials); // Add new one mDbContext.LoginCredentials.Add(loginCredentials); // Save changes await mDbContext.SaveChangesAsync(); }