mirror of
https://github.com/bitwarden/server
synced 2026-01-13 14:03:58 +00: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:
@@ -5,6 +5,8 @@ using Bit.Infrastructure.EntityFramework.Repositories.Queries;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace Bit.Infrastructure.EntityFramework.Repositories;
|
||||
|
||||
public abstract class Repository<T, TEntity, TId> : BaseEntityFrameworkRepository, IRepository<T, TId>
|
||||
@@ -20,7 +22,7 @@ public abstract class Repository<T, TEntity, TId> : BaseEntityFrameworkRepositor
|
||||
|
||||
protected Func<DatabaseContext, DbSet<TEntity>> GetDbSet { get; private set; }
|
||||
|
||||
public virtual async Task<T> GetByIdAsync(TId id)
|
||||
public virtual async Task<T?> GetByIdAsync(TId id)
|
||||
{
|
||||
using (var scope = ServiceScopeFactory.CreateScope())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user