implement all Data Helper Requirements ...
This commit is contained in:
@@ -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<XWebinar, Guid>, IXWebinarGraphQLTypeHelper
|
||||
{
|
||||
|
||||
public XWebinarGraphQLTypeHelper(
|
||||
XDataServiceConfiguration configuration
|
||||
) : base(configuration)
|
||||
{ }
|
||||
|
||||
public override string GetInQueryCollectionName()
|
||||
{
|
||||
return "webinars";
|
||||
}
|
||||
|
||||
public override string GetInQuerySingleName()
|
||||
{
|
||||
return "webinar";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<XWebinar, Guid, XWebinarGraphType, GuidGraphType>
|
||||
{
|
||||
|
||||
public XWebinarGraphQuery(
|
||||
XDataServiceConfiguration configuration,
|
||||
IXWebinarRepository repository,
|
||||
IXWebinarGraphQLTypeHelper helper
|
||||
) : base(
|
||||
configuration,
|
||||
repository,
|
||||
helper
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<XWebinar, Guid>
|
||||
{
|
||||
|
||||
public XWebinarGraphType() : base()
|
||||
{
|
||||
Field(x => x.Title);
|
||||
Field(x => x.Description);
|
||||
Field(x => x.OwnerId);
|
||||
Field(x => x.CreatedOn);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<XWebinarSubscriber, int>, IXWebinarSubscriberGraphQLTypeHelper
|
||||
{
|
||||
public XWebinarSubscriberGraphQLTypeHelper(
|
||||
XDataServiceConfiguration configuration
|
||||
) : base(configuration) { }
|
||||
|
||||
public override string GetInQueryCollectionName()
|
||||
{
|
||||
return "webinarSubscribers";
|
||||
}
|
||||
|
||||
public override string GetInQuerySingleName()
|
||||
{
|
||||
return "webinarSubscriber";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<XWebinarSubscriber, int, XWebinarSubscriberGraphType, IntGraphType>
|
||||
{
|
||||
|
||||
public XWebinarSubscriberGraphQuery(
|
||||
XDataServiceConfiguration configuration,
|
||||
IXWebinarSubscriberRepository repository,
|
||||
IXWebinarSubscriberGraphQLTypeHelper helper
|
||||
) : base(
|
||||
configuration,
|
||||
repository,
|
||||
helper
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<XWebinarSubscriber, int>
|
||||
{
|
||||
|
||||
public XWebinarSubscriberGraphType() : base()
|
||||
{
|
||||
Field(x => x.SubscriberId);
|
||||
Field(x => x.WebinarId);
|
||||
Field(x => x.SubscribedOn);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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<XWebinar, Guid>
|
||||
{ }
|
||||
}
|
||||
@@ -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<XWebinar, Guid>
|
||||
{ }
|
||||
}
|
||||
@@ -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<XWebinarSubscriber, int>
|
||||
{ }
|
||||
}
|
||||
@@ -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<XWebinarSubscriber, int>
|
||||
{ }
|
||||
}
|
||||
Reference in New Issue
Block a user