source: ChapterX.Application/Abstractions/IApplicationDbContext.cs@ a8f4a2d

main
Last change on this file since a8f4a2d was d300631, checked in by kikisrbinoska <srbinoskakristina07@…>, 2 months ago

Added transactions and pooling

  • Property mode set to 100644
File size: 2.2 KB
RevLine 
[877c13c]1using Microsoft.EntityFrameworkCore;
[d300631]2using Microsoft.EntityFrameworkCore.Storage;
[877c13c]3using UserEntity = ChapterX.Domain.Entities.User;
4using StoryEntity = ChapterX.Domain.Entities.Story;
5using ChapterEntity = ChapterX.Domain.Entities.Chapter;
6using CommentEntity = ChapterX.Domain.Entities.Comment;
7using GenreEntity = ChapterX.Domain.Entities.Genre;
8using ReadingListEntity = ChapterX.Domain.Entities.ReadingList;
9using ReadingListItemsEntity = ChapterX.Domain.Entities.ReadingListItems;
10using NotificationEntity = ChapterX.Domain.Entities.Notification;
11using LikesEntity = ChapterX.Domain.Entities.Likes;
12using CollaborationEntity = ChapterX.Domain.Entities.Collaboration;
13using NotifyEntity = ChapterX.Domain.Entities.Notify;
14using AISuggestionEntity = ChapterX.Domain.Entities.AISuggestion;
15using AdminEntity = ChapterX.Domain.Entities.Admin;
16using WriterEntity = ChapterX.Domain.Entities.Writer;
17using RegularUserEntity = ChapterX.Domain.Entities.RegularUser;
18using HasGenreEntity = ChapterX.Domain.Entities.HasGenre;
19using NeedApprovalEntity = ChapterX.Domain.Entities.NeedApproval;
20
21namespace ChapterX.Application.Abstractions
22{
23 public interface IApplicationDbContext
24 {
25 DbSet<UserEntity> Users { get; }
26 DbSet<StoryEntity> Stories { get; }
27 DbSet<ChapterEntity> Chapters { get; }
28 DbSet<CommentEntity> Comments { get; }
29 DbSet<GenreEntity> Genres { get; }
30 DbSet<ReadingListEntity> ReadingLists { get; }
31 DbSet<ReadingListItemsEntity> ReadingListItems { get; }
32 DbSet<NotificationEntity> Notifications { get; }
33 DbSet<LikesEntity> Likes { get; }
34 DbSet<CollaborationEntity> Collaborations { get; }
35 DbSet<NotifyEntity> Notifies { get; }
36 DbSet<AISuggestionEntity> AISuggestions { get; }
37 DbSet<AdminEntity> Admins { get; }
38 DbSet<WriterEntity> Writers { get; }
39 DbSet<RegularUserEntity> RegularUsers { get; }
40 DbSet<HasGenreEntity> HasGenres { get; }
41 DbSet<NeedApprovalEntity> NeedApprovals { get; }
42 Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
[d300631]43 Task<IDbContextTransaction> BeginTransactionAsync(CancellationToken cancellationToken = default);
[877c13c]44 }
45}
Note: See TracBrowser for help on using the repository browser.