diff --git a/DataHelper/GraphQL/XWebinarGraphQLTypeHelper.cs b/DataHelper/GraphQL/XWebinarGraphQLTypeHelper.cs index 16d16b3..de01e92 100644 --- a/DataHelper/GraphQL/XWebinarGraphQLTypeHelper.cs +++ b/DataHelper/GraphQL/XWebinarGraphQLTypeHelper.cs @@ -1,12 +1,26 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using xDataService.Configuration; +using xDataService.GraphQL; +using xWebinarService.Interfaces.Entities; +using xWebinarService.Models.Entities; namespace xWebinarService.DataHelper.GraphQL { - public class XWebinarGraphQLTypeHelper + public class XWebinarGraphQLTypeHelper : XBaseGraphQLTypeHelper, IXWebinarGraphQLTypeHelper { - + public XWebinarGraphQLTypeHelper( + XDataServiceConfiguration configuration + ) : base(configuration) + { } + + public override string GetInQueryCollectionName() + { + return "webinars"; + } + + public override string GetInQuerySingleName() + { + return "webinar"; + } } } \ No newline at end of file diff --git a/DataHelper/GraphQL/XWebinarGraphQuery.cs b/DataHelper/GraphQL/XWebinarGraphQuery.cs index c5e1359..fdb72c0 100644 --- a/DataHelper/GraphQL/XWebinarGraphQuery.cs +++ b/DataHelper/GraphQL/XWebinarGraphQuery.cs @@ -1,12 +1,23 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using GraphQL.Types; +using xDataService.Configuration; +using xDataService.GraphQL; +using xWebinarService.Interfaces.Entities; +using xWebinarService.Models.Entities; namespace xWebinarService.DataHelper.GraphQL { - public class XWebinarGraphQuery + public class XWebinarGraphQuery : XBaseGraphQLQuery { - + public XWebinarGraphQuery( + XDataServiceConfiguration configuration, + IXWebinarRepository repository, + IXWebinarGraphQLTypeHelper helper + ) : base( + configuration, + repository, + helper + ) + { } } } \ No newline at end of file diff --git a/DataHelper/GraphQL/XWebinarGraphSchema.cs b/DataHelper/GraphQL/XWebinarGraphSchema.cs index 780264a..668c110 100644 --- a/DataHelper/GraphQL/XWebinarGraphSchema.cs +++ b/DataHelper/GraphQL/XWebinarGraphSchema.cs @@ -1,12 +1,13 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using GraphQL.Types; namespace xWebinarService.DataHelper.GraphQL { - public class XWebinarGraphSchema + public class XWebinarGraphSchema : Schema { - + public XWebinarGraphSchema(IServiceProvider services) : base(services) + { + Query = (XWebinarGraphQuery)services.GetService(typeof(XWebinarGraphQuery)); + } } } \ No newline at end of file diff --git a/DataHelper/GraphQL/XWebinarGraphType.cs b/DataHelper/GraphQL/XWebinarGraphType.cs index cbbe6d9..384f271 100644 --- a/DataHelper/GraphQL/XWebinarGraphType.cs +++ b/DataHelper/GraphQL/XWebinarGraphType.cs @@ -1,12 +1,17 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using xDataService.GraphQL; +using xWebinarService.Models.Entities; namespace xWebinarService.DataHelper.GraphQL { - public class XWebinarGraphType + public class XWebinarGraphType : XBaseGraphObjectType { - + public XWebinarGraphType() : base() + { + Field(x => x.Title); + Field(x => x.Description); + Field(x => x.OwnerId); + Field(x => x.CreatedOn); + } } } \ No newline at end of file diff --git a/DataHelper/GraphQL/XWebinarSubscriberGraphQLTypeHelper.cs b/DataHelper/GraphQL/XWebinarSubscriberGraphQLTypeHelper.cs index 0769a61..939c92f 100644 --- a/DataHelper/GraphQL/XWebinarSubscriberGraphQLTypeHelper.cs +++ b/DataHelper/GraphQL/XWebinarSubscriberGraphQLTypeHelper.cs @@ -2,11 +2,27 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using xDataService.Configuration; +using xDataService.GraphQL; +using xWebinarService.Interfaces.Entities; +using xWebinarService.Models.Entities; namespace xWebinarService.DataHelper.GraphQL { - public class XWebinarSubscriberGraphQLTypeHelper + public class XWebinarSubscriberGraphQLTypeHelper : XBaseGraphQLTypeHelper, IXWebinarSubscriberGraphQLTypeHelper { + public XWebinarSubscriberGraphQLTypeHelper( + XDataServiceConfiguration configuration + ) : base(configuration) { } + public override string GetInQueryCollectionName() + { + return "webinarSubscribers"; + } + + public override string GetInQuerySingleName() + { + return "webinarSubscriber"; + } } } \ No newline at end of file diff --git a/DataHelper/GraphQL/XWebinarSubscriberGraphQuery.cs b/DataHelper/GraphQL/XWebinarSubscriberGraphQuery.cs index 92f067f..0323638 100644 --- a/DataHelper/GraphQL/XWebinarSubscriberGraphQuery.cs +++ b/DataHelper/GraphQL/XWebinarSubscriberGraphQuery.cs @@ -1,12 +1,23 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using GraphQL.Types; +using xDataService.Configuration; +using xDataService.GraphQL; +using xWebinarService.Interfaces.Entities; +using xWebinarService.Models.Entities; namespace xWebinarService.DataHelper.GraphQL { - public class XWebinarSubscriberGraphQuery + public class XWebinarSubscriberGraphQuery : XBaseGraphQLQuery { - + public XWebinarSubscriberGraphQuery( + XDataServiceConfiguration configuration, + IXWebinarSubscriberRepository repository, + IXWebinarSubscriberGraphQLTypeHelper helper + ) : base( + configuration, + repository, + helper + ) + { + } } } \ No newline at end of file diff --git a/DataHelper/GraphQL/XWebinarSubscriberGraphSchema.cs b/DataHelper/GraphQL/XWebinarSubscriberGraphSchema.cs index 123e4f6..b4185da 100644 --- a/DataHelper/GraphQL/XWebinarSubscriberGraphSchema.cs +++ b/DataHelper/GraphQL/XWebinarSubscriberGraphSchema.cs @@ -1,12 +1,13 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using GraphQL.Types; namespace xWebinarService.DataHelper.GraphQL { - public class XWebinarSubscriberGraphSchema + public class XWebinarSubscriberGraphSchema : Schema { - + public XWebinarSubscriberGraphSchema(IServiceProvider services) : base(services) + { + Query = (XWebinarSubscriberGraphQuery)services.GetService(typeof(XWebinarSubscriberGraphQuery)); + } } } \ No newline at end of file diff --git a/DataHelper/GraphQL/XWebinarSubscriberGraphType.cs b/DataHelper/GraphQL/XWebinarSubscriberGraphType.cs index beb261c..6a780fc 100644 --- a/DataHelper/GraphQL/XWebinarSubscriberGraphType.cs +++ b/DataHelper/GraphQL/XWebinarSubscriberGraphType.cs @@ -1,12 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using xDataService.GraphQL; +using xWebinarService.Models.Entities; namespace xWebinarService.DataHelper.GraphQL { - public class XWebinarSubscriberGraphType + public class XWebinarSubscriberGraphType : XBaseGraphObjectType { - + public XWebinarSubscriberGraphType() : base() + { + Field(x => x.SubscriberId); + Field(x => x.WebinarId); + Field(x => x.SubscribedOn); + } } } \ No newline at end of file diff --git a/DataHelper/Repository/EF/XWebinarEFRepository.cs b/DataHelper/Repository/EF/XWebinarEFRepository.cs deleted file mode 100644 index 9c79863..0000000 --- a/DataHelper/Repository/EF/XWebinarEFRepository.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace xWebinarService.DataHelper.Repository.EF -{ - public class XWebinarEFRepository - { - - } -} \ No newline at end of file diff --git a/DataHelper/Repository/EF/XWebinarSubscriberEFRepository.cs b/DataHelper/Repository/EF/XWebinarSubscriberEFRepository.cs deleted file mode 100644 index 09f0aa2..0000000 --- a/DataHelper/Repository/EF/XWebinarSubscriberEFRepository.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace xWebinarService.DataHelper.Repository.EF -{ - public class XWebinarSubscriberEFRepository - { - - } -} \ No newline at end of file diff --git a/DataHelper/Repository/Mongo/XWebinarMongoRepository.cs b/DataHelper/Repository/Mongo/XWebinarMongoRepository.cs deleted file mode 100644 index 37ac3fe..0000000 --- a/DataHelper/Repository/Mongo/XWebinarMongoRepository.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace xWebinarService.DataHelper.Repository.Mongo -{ - public class XWebinarMongoRepository - { - - } -} \ No newline at end of file diff --git a/DataHelper/Repository/Mongo/XWebinarSubscriberMongoRepository.cs b/DataHelper/Repository/Mongo/XWebinarSubscriberMongoRepository.cs deleted file mode 100644 index 775ab35..0000000 --- a/DataHelper/Repository/Mongo/XWebinarSubscriberMongoRepository.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace xWebinarService.DataHelper.Repository.Mongo -{ - public class XWebinarSubscriberMongoRepository - { - - } -} \ No newline at end of file diff --git a/Interfaces/Entities/IXWebinarGraphQLTypeHelper.cs b/Interfaces/Entities/IXWebinarGraphQLTypeHelper.cs index e89e79a..a6e47d2 100644 --- a/Interfaces/Entities/IXWebinarGraphQLTypeHelper.cs +++ b/Interfaces/Entities/IXWebinarGraphQLTypeHelper.cs @@ -1,12 +1,9 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using xDataService.Interfaces; +using xWebinarService.Models.Entities; namespace xWebinarService.Interfaces.Entities { - public interface IXWebinarGraphQLTypeHelper - { - - } + public interface IXWebinarGraphQLTypeHelper : IXBaseGraphQLTypeHelper + { } } \ No newline at end of file diff --git a/Interfaces/Entities/IXWebinarRepository.cs b/Interfaces/Entities/IXWebinarRepository.cs index 60b04b8..2ea4291 100644 --- a/Interfaces/Entities/IXWebinarRepository.cs +++ b/Interfaces/Entities/IXWebinarRepository.cs @@ -1,12 +1,9 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using xDataService.Interfaces; +using xWebinarService.Models.Entities; namespace xWebinarService.Interfaces.Entities { - public interface IXWebinarRepository - { - - } + public interface IXWebinarRepository : IXBaseRepository + { } } \ No newline at end of file diff --git a/Interfaces/Entities/IXWebinarSubscriberGraphQLTypeHelper.cs b/Interfaces/Entities/IXWebinarSubscriberGraphQLTypeHelper.cs index dc41f4b..3a70125 100644 --- a/Interfaces/Entities/IXWebinarSubscriberGraphQLTypeHelper.cs +++ b/Interfaces/Entities/IXWebinarSubscriberGraphQLTypeHelper.cs @@ -1,12 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using xDataService.Interfaces; +using xWebinarService.Models.Entities; namespace xWebinarService.Interfaces.Entities { - public interface IXWebinarSubscriberGraphQLTypeHelper - { - - } + public interface IXWebinarSubscriberGraphQLTypeHelper : IXBaseGraphQLTypeHelper + { } } \ No newline at end of file diff --git a/Interfaces/Entities/IXWebinarSubscriberRepository.cs b/Interfaces/Entities/IXWebinarSubscriberRepository.cs index 8fc9cd0..b79bee4 100644 --- a/Interfaces/Entities/IXWebinarSubscriberRepository.cs +++ b/Interfaces/Entities/IXWebinarSubscriberRepository.cs @@ -1,12 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using xDataService.Interfaces; +using xWebinarService.Models.Entities; namespace xWebinarService.Interfaces.Entities { - public interface IXWebinarSubscriberRepository - { - - } + public interface IXWebinarSubscriberRepository : IXBaseRepository + { } } \ No newline at end of file