| | 1 | | using MUNity.Database.Context; |
| | 2 | | using System; |
| | 3 | | using System.Collections.Generic; |
| | 4 | | using System.Linq; |
| | 5 | | using System.Text; |
| | 6 | | using System.Threading.Tasks; |
| | 7 | |
|
| | 8 | | namespace MUNity.Database.FluentAPI; |
| | 9 | |
|
| | 10 | | public class FluentProvider |
| | 11 | | { |
| 95 | 12 | | public MunityContext DbContext { get; private set; } |
| | 13 | |
|
| 5 | 14 | | public OrganizationTools Organization => new OrganizationTools(DbContext); |
| | 15 | |
|
| | 16 | | public OrganizationSpecificTools ForOrganization(string organizationId) |
| 5 | 17 | | { |
| 5 | 18 | | return new OrganizationSpecificTools(DbContext, organizationId); |
| 5 | 19 | | } |
| | 20 | |
|
| 1 | 21 | | public ProjectTools Project => new ProjectTools(this.DbContext); |
| | 22 | |
|
| | 23 | |
|
| 1 | 24 | | public ConferenceTools Conference => new ConferenceTools(DbContext); |
| | 25 | |
|
| | 26 | | public ConferenceSpecificTools ForConference(string conferenceId) => |
| 49 | 27 | | new ConferenceSpecificTools(this.DbContext, conferenceId); |
| | 28 | |
|
| | 29 | | public CommitteeSpecificTools ForCommittee(string committeeId) => |
| 9 | 30 | | new CommitteeSpecificTools(this.DbContext, committeeId); |
| | 31 | |
|
| 25 | 32 | | public FluentProvider(MunityContext context) |
| 25 | 33 | | { |
| 25 | 34 | | this.DbContext = context; |
| 25 | 35 | | } |
| | 36 | | } |