This commit is contained in:
2026-05-09 22:22:02 +03:30
parent 6b6790b61a
commit 2a0e8e4074
17 changed files with 205 additions and 5 deletions
+26
View File
@@ -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
)
{ }
}
}
+20
View File
@@ -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";
}
}
}
+23
View File
@@ -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
)
{ }
}
}
+13
View File
@@ -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));
}
}
}
+15
View File
@@ -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);
}
}
}
+9
View File
@@ -0,0 +1,9 @@
using xDataService.Providers;
using xServices.Interfaces;
using xServices.Models.Entities;
namespace xServices.Providers
{
public class XTestKeyGenerator : XGuidKeyGenerator<XTest>, IXTestKeyGenerator
{ }
}
+9
View File
@@ -0,0 +1,9 @@
using xDataService.Events;
using xServices.Interfaces;
using xServices.Models.Entities;
namespace xServices.Providers
{
public class XTestRepositoryEvents : XBaseRepositoryEvents<XTest>, IXTestRepositoryEvents
{ }
}