Tag: Asp.Net Core
-
Invalid cast Microsoft.EntityFrameworkCore.HierarchyId
0 I use GraphQl to fetch the data, here is my method in order to get the result based on category ID. public IQueryable<Product> GetActiveProducts( string categoryId, CancellationToken cancellationToken ) => return _dDbContext.Categories.Where(x => x.Id == categoryId); Also, my entity is as follows: public class Category:IEntityHierarchy { public string Id { get; set; } //…
-
GraphQL Server – Addscoped (without explicityly specifying)
0 I am writing a graphql api using .net core+hot chocolate. I have to define all service names while creating graphql server. I have more than 20 service classes. Is there a generic way of specifying these services, I dont want to write 20 + lines of code to specify each service name. addscoped .net…
-
graph ql code auto generation .net core hot chocolate
0 I am writing an API to fetch data from sql db(about 120+ tables). I have generated model class files automatically. Is there any automatic way to generate Service and Query class files? Right now I am writing these IService and class files. enter image description here enter image description here .net api asp.net-core graphql…
-
How I can pass GraphQL header in ASP.NET Core 6?
0 I use ASP.NET Core to consume GraphQL API and everything working fine, just I need pass the header because I need to use Arabica language and I don’t know how I can pass it. So I need to change language to "ar" when header is passing. [HttpPost] public async Task<IActionResult> Tracking(string code) { var…