Change Autoquery return type in DTO generation
I want to return a custom class from my custom AutoQuery endpoint that inherits `QueryResponse<T>` but adds a few extra properties. ``` public class WritingAssignmentBlogLookUpResponse : QueryResponse...
- Modified
- 24 May at 21:49
IDX10503: Signature validation failed. Token does not have a kid. Keys tried: 'System.Text.StringBuilder'
I have the below JWT token, ``` eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJjbGllbnRpZCIsImF1ZCI6ImNsaWVudGlkIiwic3ViIjoiMTIzIiwiYSI6IjQ1NiIsImlhdCI6MTYyMTc5OTU5OCwiZXhwIjoxNjIxNzk5NjU4fQ.hglbX63z...
- Modified
- 23 May at 20:19
Why does double.IsNegative(double.NaN) return true?
Why does `double.IsNegative(double.NaN)` unexpectedly return `true` whereas `double.NaN < 0` returns `false` as expected?
- Modified
- 20 May at 18:45
What is the precise difference between TryAddEnumerable(ServiceDescriptor) and other TryAdd{lifetime} calls
Both services.TryAddEnumerable(ServiceDescriptor) and the other group of calls (TryAddSingleton, TryAddScoped, TryAddTransient) seem to do the same thing -- they first check for prior registration of ...
- Modified
- 19 May at 23:14
How to set 'EmbedAssembliesIntoApk' MSBuild property to 'true' in Visual Studio for Mac on Android project?
I have a issue in my android project, and want to set `EmbedAssembliesIntoApk` to true ? The error is: > error XA0130: Please disable fast deployment in the Visual Studio project property pages or edi...
Determine the target type for a dependency during resolution
It seems to be impossible to determine the type for which a dependency is resolved: ``` containerBuilder.Register(context => { // What is the type for which this component is resolved? var type ...
Using serilog in a class library referenced by other projects
I have a solution containing multiple .NET Core API and windows services. How can I integrate Serilog in such a way that I will not be required to make changes at several different places for adding a...
Record type with multiple constructors
How do I create for a record type in C#? I created a record type like this: ``` public record Person(int Id, string FirstName, string LastName) ``` Now I want to introduce another constructor overlo...
Entity Framework : join two tables and where clause
I'm having trouble working with Entity Framework and PostgreSQL, does anybody know how to join two tables and use the second table as a where clause? The select I want to do in Entity Framework would ...
- Modified
- 14 May at 13:25
Serialize dynamic list to CSV without header in Servicestack.Text
I'm trying to generate a csv file using `CsvSerializer.SerializeToCsv(data)`, but I want to omit the headers. I read [this question](https://stackoverflow.com/questions/54211307/convert-object-to-csv-...
- Modified
- 14 May at 01:26
Autoquery CRUD for batch operations
Is there any practice using `ServiceStack AutoQuery Crud` to post multiple `CreateDb<T>` requests to insert in single transaction multiple rows (Auto Batched Requests?)? UPDATE: I have tried to use @m...
- Modified
- 14 May at 05:40
Non-nullable property must contain a non-null value when exiting constructor. Consider declaring the property as nullable
I have a simple class like this. ``` public class Greeting { public string From { get; set; } public string To { get; set; } public string Message { get; set; } } ``` Strangely I get the...
- Modified
- 4 Jan at 07:25
Can AutoQuery return a single item (not list)
When I add a type to AutoQuery, with: ``` [Route("/templates")] public class SearchTemplates : QueryDb<Template> { public int? Id { get; set; } public string Name { get; set; } } ``` then I c...
- Modified
- 12 May at 12:43
How is the ServiceStack "AllRoles" collection determined?
Trying to enable the ServiceStack Studio User Management utility to more easily manage the various users that access our APIs. It appears that to populate the roles dropdown, the User Management util...
- Modified
- 11 May at 21:4
Create user inside a transaction
When creating a user like so: ``` using var trans = Db.BeginTransaction(); AuthRepository.CreateUserAuth(newUser, request.Password); AuthRepository.AssignRoles(created, new List<string> { request.role...
- Modified
- 7 May at 05:14
ServiceStack Deserialize Json (with types) to List of specific type
I have this json: ``` { "$type": "System.Collections.Generic.List<MyType>", "$values": [ { "$type": "MyType", "o": 7.54, "t": 1619002800000, ...
- Modified
- 6 May at 20:33
Cannot find .NET 5.0 Console App project template in Visual Studio 2019
I'm currently trying to create a C# .NET 5.0 Console Application in Visual Studio 2019, and the option does not appear under project templates as I expect it to. I downloaded Visual Studio Professiona...
- Modified
- 5 May at 20:29
Error trying to create a webapi in Visual Studio Code
I get this message in the terminal: > error NU1100: Unable to resolve 'Swashbuckle.AspNetCore (>= 5.6.3)' for 'net5.0' I tried to run dotnet restore as it reccomended but it will not restore
- Modified
- 5 May at 12:32
How to solve npm install error “npm ERR! code 1”
I'm trying to install [Gulp.js](https://en.wikipedia.org/wiki/Gulp.js) and when I write `npm install` I get this issue: ``` npm ERR! code 1 npm ERR! path D:\www\wegrow\node_modules\node-sass npm ERR! ...
- Modified
- 8 Aug at 22:10
How to add SCSS styles to a React project?
I'm just starting to learn React (have some JavaScript knowledge, as I'm learning tis as well) and building my first project. I would like to know how to add styles to my first React project, using CS...
Android Emulator issues in new versions - The emulator process has terminated
After updating to Android Studio 2020.3.1 canary 15, when I try to run an emulator, it gets killed with this error: > The emulator process for AVD Pixel_4_API_30 has terminated. It was working correct...
- Modified
- 23 Jan at 13:23
ServiceStack.Redis WaitBeforeForcingMasterFailover
I'm trying to understand the motivation behind existence of `WaitBeforeForcingMasterFailover` property (and the code associated with it) inside of `ServiceStack.Redis.RedisSentinel`. If I interpreted...
- Modified
- 30 Apr at 09:1
How to remove a KEY from a dictionary in c#
I have a dictionary called d as mentioned. ``` Dictionary<string, int> d = new Dictionary<string, int>(); d["dog"] = 1; d["cat"] = 5; ``` Now if I want to remove the key "cat" I cant use the ...
- Modified
- 29 Apr at 14:3
Using SharpScript with Unity
In search for a scripting language for my Unity application I came across SharpScript and the example project ([https://github.com/ServiceStack/script-unity](https://github.com/ServiceStack/script-uni...
- Modified
- 29 Apr at 13:59
How to convert CosmosDB FeedIterator result to IAsyncEnumerable or IEnumerable?
It's a bit tricky to get data from CosmosDb FeedIterator converted into IEnumerable in a simple reusable way without having to write loops and iteration all over the place. The [official Microsoft exa...
- Modified
- 6 May at 10:32