implement Webinar and WebinarSubscriber Entity and Dto (s) and Data Requirements ...
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using xDataService.Configuration;
|
||||
using xDataService.GraphQL;
|
||||
using xWebinarService.Interfaces.Entities;
|
||||
using xWebinarService.Models.Entities;
|
||||
|
||||
namespace xWebinarService.Providers.GraphQL
|
||||
{
|
||||
public class XWebinarGraphQLTypeHelper : XBaseGraphQLTypeHelper<XWebinar, Guid>, IXWebinarGraphQLTypeHelper
|
||||
{
|
||||
public XWebinarGraphQLTypeHelper(
|
||||
XDataServiceConfiguration configuration
|
||||
) : base(configuration)
|
||||
{ }
|
||||
|
||||
public override string GetInQueryCollectionName()
|
||||
{
|
||||
return "webinars";
|
||||
}
|
||||
|
||||
public override string GetInQuerySingleName()
|
||||
{
|
||||
return "webinar";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using GraphQL.Types;
|
||||
using xDataService.Configuration;
|
||||
using xDataService.GraphQL;
|
||||
using xWebinarService.Interfaces.Entities;
|
||||
using xWebinarService.Models.Entities;
|
||||
|
||||
namespace xWebinarService.Providers.GraphQL
|
||||
{
|
||||
public class XWebinarGraphQuery : XBaseGraphQLQuery<XWebinar, Guid, XWebinarGraphType, GuidGraphType>
|
||||
{
|
||||
public XWebinarGraphQuery(
|
||||
XDataServiceConfiguration configuration,
|
||||
IXWebinarRepository repository,
|
||||
IXWebinarGraphQLTypeHelper helper
|
||||
) : base(
|
||||
configuration,
|
||||
repository,
|
||||
helper
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using GraphQL.Types;
|
||||
|
||||
namespace xWebinarService.Providers.GraphQL
|
||||
{
|
||||
public class XWebinarGraphSchema : Schema
|
||||
{
|
||||
public XWebinarGraphSchema(IServiceProvider services) : base(services)
|
||||
{
|
||||
Query = (XWebinarGraphQuery)services.GetService(typeof(XWebinarGraphQuery));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using xDataService.GraphQL;
|
||||
using xWebinarService.Models.Entities;
|
||||
|
||||
namespace xWebinarService.Providers.GraphQL
|
||||
{
|
||||
public class XWebinarGraphType : XBaseGraphObjectType<XWebinar, Guid>
|
||||
{
|
||||
public XWebinarGraphType() : base()
|
||||
{
|
||||
Field(x => x.Type);
|
||||
Field(x => x.Title);
|
||||
Field(x => x.OwnerId);
|
||||
Field(x => x.Enabled);
|
||||
Field(x => x.CreatedOn);
|
||||
Field(x => x.Description);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using xDataService.Configuration;
|
||||
using xDataService.GraphQL;
|
||||
using xWebinarService.Interfaces.Entities;
|
||||
using xWebinarService.Models.Entities;
|
||||
|
||||
namespace xWebinarService.Providers.GraphQL
|
||||
{
|
||||
public class XWebinarSubscriberGraphQLTypeHelper : XBaseGraphQLTypeHelper<XWebinarSubscriber, int>, IXWebinarSubscriberGraphQLTypeHelper
|
||||
{
|
||||
public XWebinarSubscriberGraphQLTypeHelper(
|
||||
XDataServiceConfiguration configuration
|
||||
) : base(configuration)
|
||||
{ }
|
||||
|
||||
public override string GetInQueryCollectionName()
|
||||
{
|
||||
return "webinarSubscribers";
|
||||
}
|
||||
|
||||
public override string GetInQuerySingleName()
|
||||
{
|
||||
return "webinarSubscriber";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using GraphQL.Types;
|
||||
using xDataService.Configuration;
|
||||
using xDataService.GraphQL;
|
||||
using xWebinarService.Interfaces.Entities;
|
||||
using xWebinarService.Models.Entities;
|
||||
|
||||
namespace xWebinarService.Providers.GraphQL
|
||||
{
|
||||
public class XWebinarSubscriberGraphQuery : XBaseGraphQLQuery<XWebinarSubscriber, int, XWebinarSubscriberGraphType, IntGraphType>
|
||||
{
|
||||
public XWebinarSubscriberGraphQuery(
|
||||
XDataServiceConfiguration configuration,
|
||||
IXWebinarSubscriberRepository repository,
|
||||
IXWebinarSubscriberGraphQLTypeHelper helper
|
||||
) : base(
|
||||
configuration,
|
||||
repository,
|
||||
helper
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using GraphQL.Types;
|
||||
|
||||
namespace xWebinarService.Providers.GraphQL
|
||||
{
|
||||
public class XWebinarSubscriberGraphSchema : Schema
|
||||
{
|
||||
public XWebinarSubscriberGraphSchema(IServiceProvider services) : base(services)
|
||||
{
|
||||
Query = (XWebinarSubscriberGraphQuery)services.GetService(typeof(XWebinarSubscriberGraphQuery));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using xDataService.GraphQL;
|
||||
using xWebinarService.Models.Entities;
|
||||
|
||||
namespace xWebinarService.Providers.GraphQL
|
||||
{
|
||||
public class XWebinarSubscriberGraphType : XBaseGraphObjectType<XWebinarSubscriber, int>
|
||||
{
|
||||
public XWebinarSubscriberGraphType() : base()
|
||||
{
|
||||
Field(x => x.WebinarId);
|
||||
Field(x => x.SubscribedOn);
|
||||
Field(x => x.SubscriberId);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user