Add Entities and Repositories ...

This commit is contained in:
2025-12-07 13:22:49 +03:30
parent 620a11f368
commit b6ed60b0e7
9 changed files with 108 additions and 1 deletions
+9
View File
@@ -0,0 +1,9 @@
using xDataService.Events;
using xTagService.Interfaces.Entities;
using xTagService.Models.Entities;
namespace xTagService.DataHelper.Events
{
public class XTagEvents : XBaseRepositoryEvents<XTag>, IXTagEvents
{ }
}
@@ -0,0 +1,25 @@
using xDataService.Configuration;
using xDataService.GraphQL;
using xTagService.Interfaces.Entities;
using xTagService.Models.Entities;
namespace xTagService.DataHelper.GraphQL
{
public class XTagGraphQLTypeHelper : XBaseGraphQLTypeHelper<XTag, int>, IXTagGraphQLTypeHelper
{
public XTagGraphQLTypeHelper(
XDataServiceConfiguration configuration
) : base(configuration)
{ }
public override string GetInQueryCollectionName()
{
return "tags";
}
public override string GetInQuerySingleName()
{
return "tag";
}
}
}
+22
View File
@@ -0,0 +1,22 @@
using GraphQL.Types;
using xDataService.Configuration;
using xDataService.GraphQL;
using xTagService.Interfaces.Entities;
using xTagService.Models.Entities;
namespace xTagService.DataHelper.GraphQL
{
public class XTagGraphQuery : XBaseGraphQLQuery<XTag, int, XTagGraphType, IntGraphType>
{
public XTagGraphQuery(
XDataServiceConfiguration configuration,
IXTagRepository repository,
IXTagGraphQLTypeHelper helper
) : base(
configuration,
repository,
helper
)
{ }
}
}
+13
View File
@@ -0,0 +1,13 @@
using System;
using GraphQL.Types;
namespace xTagService.DataHelper.GraphQL
{
public class XTagGraphSchema : Schema
{
public XTagGraphSchema(IServiceProvider services) : base(services)
{
Query = (XTagGraphQuery)services.GetService(typeof(XTagGraphQuery));
}
}
}
+14
View File
@@ -0,0 +1,14 @@
using xDataService.GraphQL;
using xTagService.Models.Entities;
namespace xTagService.DataHelper.GraphQL
{
public class XTagGraphType : XBaseGraphObjectType<XTag, int>
{
public XTagGraphType() : base()
{
Field(x => x.Tag);
Field(x => x.References);
}
}
}