1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 00:52:49 -05:00

[PM-2943] Enable Nullable Repositories in Unowned Files (#4549)

* Enable Nullable In Unowned Repos

* Update More Tests

* Move to One If

* Fix Collections

* Format

* Add Migrations

* Move Pragma Annotation

* Add Better Assert Message
This commit is contained in:
Justin Baur
2024-07-24 09:48:09 -04:00
committed by GitHub
parent b5f09c599b
commit 1e0182008b
67 changed files with 8432 additions and 119 deletions

View File

@ -1,9 +1,12 @@
using Bit.Core.AdminConsole.Enums.Provider;
using System.Diagnostics;
using Bit.Core.AdminConsole.Enums.Provider;
using Bit.Core.Auth.Enums;
using Bit.Core.Enums;
using Bit.Infrastructure.EntityFramework.Repositories.Queries;
using Microsoft.EntityFrameworkCore;
#nullable enable
namespace Bit.Infrastructure.EntityFramework.Repositories;
public static class DatabaseContextExtensions
@ -11,6 +14,7 @@ public static class DatabaseContextExtensions
public static async Task UserBumpAccountRevisionDateAsync(this DatabaseContext context, Guid userId)
{
var user = await context.Users.FindAsync(userId);
Debug.Assert(user is not null, "The user id is expected to be validated as a true-in database user before making this call.");
user.AccountRevisionDate = DateTime.UtcNow;
}