ServiceStack - Post Files Async using JsonServiceClient
I've trying to POST a single file from one service to another as a stream using an IServiceClient (I'm using the JsonServiceClient). I can achieve this by using code similar to: ``` using (IServiceCli...
- Modified
- 27 May at 08:44
ServiceStack with MiniProfiler for .Net 6
I was attempting to add Profiling into ServiceStack 6 with .Net 6 and using the .Net Framework MiniProfiler Plugin code as a starting point. I noticed that ServiceStack still has `Profiler.Current.Ste...
- Modified
- 24 May at 21:59
Is there a dialog for saving files in .NET MAUI?
.NET MAUI provides a FilePicker to show a native Dialog where you can pick a file from the device. Is there a way to show a dialog for saving files? (where you can select a path and enter an filename,...
Resolving Dependencies based on request in Servicestack
I have a Servicestack Api and i need suggestions \ ideas in injection the dependencies. My Api needs to call appropriate dependency based on the request parameters I have registered the dependencies a...
- Modified
- 21 May at 00:58
ServiceStack custom route variable placeholder doesn't have any constraint validation?
I have 2 endpoints built by ServiceStack services: - `DELETE: /parents/{parentId}`- `DELETE: /parents/{parentId}/children/{childId}` ### Delete parent: /parents/{parentId} ``` [Api("Delete a parent...
- Modified
- 20 May at 01:4
Subtract DateOnly in C#
In C# I can't use subtraction with `DateOnly` variables, unlike `DateTime`. Is there any explanation? ``` var a = new DateTime(2000, 01, 01); var b = new DateTime(1999, 01, 01); //var c = a.Subtr...
Servicestack return array instead of object with an array
I have a servicestack POCO object ``` public class SiteCalendarItem { [DataMember(Name = "title")] public string Title { get; set; } [DataMember(Name = "start")] public string StartD {...
- Modified
- 19 May at 11:34
ServiceStack AutoQuery - Table not accessibele
When I try to use the property, the table is not generated or is not accessible using the AutoQuery API. When calling /metadata I only see these two endpoints: - - Is there a way to debug this or do...
- Modified
- 19 May at 12:22
Issues faced during ServiceStack Ugrade from 3.9.71 to 5.9.2
ServiceStack Old Version: 3.9.71 ServiceStack New version: 5.9.2 .Net Framework: 4.6.1 We are facing quite a few issues while trying to upgrade ServiceStack. Could someone please help. The predominant...
- Modified
- 17 May at 11:48
ServiceStack Ormlite Object column is not populated
Using ServiceStack Ormlite 5.12.0. I have a model looks like the following, saving the object is perfectly fine. ``` public string DescriptionAlias { get; set; } /// <summary> /// Applying PLU...
- Modified
- 16 May at 08:23
Servicestack AutoQuery -> System.TypeLoadException Error
I'm trying to servicify an existing RDBMS with C# AutoQuery, but getting this error: ``` HResult=0x80131522 Message=Type 'WebApplication1.ServiceModel.CreateCurrency' from assembly 'tmpCrudAssembly,...
- Modified
- 16 May at 06:47
ServiceStack: Dto.ToAbsoluteUri throws exception complaining about AppHost
I'm trying to get the AbsoluteUri from a dto object. As expected, all of these give me the RelativeUri: ``` dto.ToUrl(); dto.ToGetUrl(); dto.ToRelativeUri("GET"); ``` Naturally I would expect `dto.To...
- Modified
- 10 May at 10:43
While returning HttpResult I cant see customized Headers in the response using C# and ServiceStack
I am making a simple API and want to return HTTPResult with some custom headers. I am using Postman to trigger the API but in the Response headers are not displayed. ``` return new HttpResult($"Ping m...
- Modified
- 10 May at 08:1
Why doesn't return default(T?) give a null when T is constrained to enum?
I have a parser that render text files into a datamodel. Some fields are optional, which are to be represented as null in the model. However, a strange behavior is giving me a headache. When I handle ...
ServiceStack AutoQuery AutoFilter Like operand
I am trying to implement SQL operator using AutoFilter attribute. Tried the below code, ``` [AutoFilter(field:"Name", Template = "{Field} like {Value}", ValueFormat = "%{0}%")] ``` and the transfor...
- Modified
- 8 May at 23:6
ServiceStack async PreRequestFilters
Is there any way to run PreRequestFilters that are async? I can see that there's been a number of async request filters added, but no async version of PreRequestFilters. It would be nice to have an as...
- Modified
- 5 May at 23:42
How should BlobServiceClient be created?
Should the BlobServiceClient be created in a similar pattern like HttpClient, effectively as a singleton, or should it be done per request? My instinct suggests that it should be a singleton but I cou...
- Modified
- 5 Jun at 09:46
ServiceStack IAuthWithRequest
I’m getting confused about implementing a CustomAuthProvider that extends the IAuthWithRequest interface. The wish is for this AuthProvider to recover domain credentials and authenticate against a t...
- Modified
- 2 May at 18:26
Web API Asp.Net 6 Routing Clarification
I am using Asp.net 6 web API in my project and I am confused about understanding routing functions. Previously when we build API we use to use following middleware But now in Asp.Net 6 the default way...
- Modified
- 22 May at 04:14
How can I add System.Windows.Forms to WPF application when adding via reference/Depenency doesn't work?
Following every guide everywhere: * Step 1: [![enter image description here][1]][1] * Step 2: it works! Huzzah! Except that it doesn't. Instead I get yellow triangles: [. I use it this retrieve the hash I store along with the string content, to evaluate if this latter has been changed whil...
- Modified
- 28 Apr at 15:14
Each parameter in the deserialization constructor on type must bind to an object property or field on deserialization
I have the following simple classes : ``` public abstract class GitObject { public Repository Repository { get; set; } public abstract string Serialize(); public abstract void Deserialize(...
- Modified
- 5 Jun at 19:24
ServiceStack Todo Rest Api with Crud operations - How to override Get, Post.. etc methods?
These are my first steps in ServiceStack. I am a total noob. I created simple Todo Rest Api with MySql Db connection. I am trying to Get all the incoming Todos based on date (greater than or equal giv...
- Modified
- 24 Apr at 17:13
Prevent C# "with expressions" bypassing constructor validation
I was disappointed to discover that C#'s "with expressions" allow the caller to bypass constructor validations on the record. Consider: ``` record AscendingPair { public AscendingPair(int small, ...
- Modified
- 10 May at 18:24