Skip to content

Commit

Permalink
Refactor this method to have parameters matching all the type paramet…
Browse files Browse the repository at this point in the history
…ers.
  • Loading branch information
mohammadKarimi committed Jan 9, 2024
1 parent df95200 commit 372b882
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ public interface IApplicationDbContext
/// <returns></returns>
public Task<Result> SaveChangesAsync(CancellationToken cancellationToken = default);

DbSet<TEntity> Set<TEntity>() where TEntity : class, IEntity;
DbSet<TEntity> Set<TEntity>() where TEntity : class;
}
2 changes: 1 addition & 1 deletion src/SwiftLink.Domain/Entities/Link.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ public class Link: IEntity
public DateTime ExpirationDate { get; set; }
public bool IsBanned { get; set; }
public string Password { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/SwiftLink.Domain/Entities/Subscriber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public class Subscriber: IEntity
public Guid Token { get; set; }
public string Name { get; set; }
public bool IsActive { get; set; }
}
}
2 changes: 0 additions & 2 deletions src/SwiftLink.Infrastructure/Context/ApplicationDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,4 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
}
}

public new DbSet<TEntity> Set<TEntity>() where TEntity : class, IEntity
=> base.Set<TEntity>();
}

0 comments on commit 372b882

Please sign in to comment.