last ...
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using xDataService.Configuration;
|
||||
using xDataService.EFRepositories;
|
||||
using xDataService.Interfaces;
|
||||
using xServices.Databases;
|
||||
using xServices.Interfaces;
|
||||
using xServices.Models.Entities;
|
||||
|
||||
namespace xServices.Providers
|
||||
{
|
||||
public class XTestEFRepository : XBaseEFRepository<XTest, Guid, XApiDbContext>, IXTestRepository
|
||||
{
|
||||
public XTestEFRepository(
|
||||
IXUnitOfWorks<XApiDbContext> unitOfWorks,
|
||||
XDataServiceConfiguration configuration,
|
||||
IXTestKeyGenerator keyGenerator = null,
|
||||
IXTestRepositoryEvents baseRepositoryEvents = null
|
||||
) : base(
|
||||
unitOfWorks,
|
||||
configuration,
|
||||
keyGenerator,
|
||||
baseRepositoryEvents
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using xDataService.GraphQL;
|
||||
using xServices.Interfaces;
|
||||
using xServices.Models.Entities;
|
||||
|
||||
namespace xServices.Providers
|
||||
{
|
||||
public class XTestGraphQLTypeHelper : XBaseGraphQLTypeHelper<XTest, Guid>, IXTestGraphQLTypeHelper
|
||||
{
|
||||
public override string GetInQueryCollectionName()
|
||||
{
|
||||
return "tests";
|
||||
}
|
||||
|
||||
public override string GetInQuerySingleName()
|
||||
{
|
||||
return "test";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using GraphQL.Types;
|
||||
using xDataService.Configuration;
|
||||
using xDataService.GraphQL;
|
||||
using xServices.Interfaces;
|
||||
using xServices.Models.Entities;
|
||||
|
||||
namespace xServices.Providers
|
||||
{
|
||||
public class XTestGraphQuery : XBaseGraphQLQuery<XTest, Guid, XTestGraphType, GuidGraphType>, IXTestGraphQuery
|
||||
{
|
||||
public XTestGraphQuery(
|
||||
XDataServiceConfiguration configuration,
|
||||
IXTestRepository repository,
|
||||
IXTestGraphQLTypeHelper helper
|
||||
) : base(
|
||||
configuration,
|
||||
repository,
|
||||
helper
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using GraphQL.Types;
|
||||
|
||||
namespace xServices.Providers
|
||||
{
|
||||
public class XTestGraphSchema : Schema
|
||||
{
|
||||
public XTestGraphSchema(IServiceProvider services) : base(services)
|
||||
{
|
||||
Query = (XTestGraphQuery)services.GetService(typeof(XTestGraphQuery));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using xDataService.GraphQL;
|
||||
using xServices.Models.Entities;
|
||||
|
||||
namespace xServices.Providers
|
||||
{
|
||||
public class XTestGraphType : XBaseGraphObjectType<XTest, Guid>
|
||||
{
|
||||
public XTestGraphType() : base()
|
||||
{
|
||||
Field(x => x.Firstname);
|
||||
Field(x => x.Lastname);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using xDataService.Providers;
|
||||
using xServices.Interfaces;
|
||||
using xServices.Models.Entities;
|
||||
|
||||
namespace xServices.Providers
|
||||
{
|
||||
public class XTestKeyGenerator : XGuidKeyGenerator<XTest>, IXTestKeyGenerator
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using xDataService.Events;
|
||||
using xServices.Interfaces;
|
||||
using xServices.Models.Entities;
|
||||
|
||||
namespace xServices.Providers
|
||||
{
|
||||
public class XTestRepositoryEvents : XBaseRepositoryEvents<XTest>, IXTestRepositoryEvents
|
||||
{ }
|
||||
}
|
||||
Reference in New Issue
Block a user