How to stop self-referencing loop in .Net Core Web API?
I'm having some issues which I'm guessing are related to self-referencing using .NET Core Web API and Entity Framework Core. My Web API starting choking when I added .Includes for some navigation pro...
- Modified
- 29 Nov at 07:48
How to escape curly-brackets in f-strings?
I have a string in which I would like curly-brackets, but also take advantage of the f-strings feature. Is there some syntax that works for this? Here are two ways it does not work. I would like to in...
- Modified
- 5 Jul at 20:21
No non-OData HTTP route registered
I followed [this](https://learn.microsoft.com/en-US/azure/app-service-web/web-sites-dotnet-rest-service-aspnet-api-sql-database) tutorial to create a WebAPI REST service. After that, I could load the...
- Modified
- 28 Feb at 22:16
Force locale with Asp.Net Core
I'm having some odd issues with a web application written using Asp.Net Core 1.1, using the full .Net Framework v4.6.2. I want to force the application to use a swedish locale (sv-SE). This is workin...
- Modified
- 28 Feb at 21:28
How to configure AutoMapper with generic types
I am trying to implement propertywise version tracking in my entities. Using the schema of `TrackedProperty` for my trackable properties; ``` public class PropertyVersion<TValue, TVersion> { publ...
- Modified
- 28 Feb at 19:57
FileProvider - IllegalArgumentException: Failed to find configured root
I'm trying to take a picture with camera, but I'm getting the following error: ``` FATAL EXCEPTION: main Process: com.example.marek.myapplication, PID: 6747 java.lang.IllegalArgumentException: Failed...
- Modified
- 23 Oct at 09:39
Pass a List to a params parameter
Is there was a way to pass a `List` as an argument to a `params` parameter? Suppose I have a method like this: ``` void Foo(params int[] numbers) { // ... } ``` This way I can call it by passin...
- Modified
- 28 Feb at 17:59
How to set time with date in momentjs
Does provide any option to set time with particular time ? ``` var date = "2017-03-13"; var time = "18:00"; var timeAndDate = moment(date).startOf(time); console.log(timeAndDate); ``` ``` <script ...
- Modified
- 1 Mar at 09:46
How to use APNs Auth Key (.p8 file) in C#?
I'm trying to send push notifications to iOS devices, using token-based authentication. As required, I generated an APNs Auth Key in Apple's Dev Portal, and downloaded it (it's a file with p8 extensi...
- Modified
- 28 Feb at 16:44
Error CS0234 when building solution using TFS 2017 BuildAgent
I ran into the following probem, when trying to build using a TFS build definition. When executing a Build the agent logs following errors: > Error CS0234: The type or namespace name 'VisualStudio' do...
- Modified
- 20 Jun at 09:12
ServiceStack AutoQuery Send Filter's Manually
We are trying to use the JsonServiceClient to manually construct autoquery requests. The code is pretty simple for most operations but I don't see how filters are applied: ``` var client = new JsonS...
- Modified
- 28 Feb at 14:18
Run Asynchronous tasks in Batch
I am running one stored procedure asynchronously (I need to run the same SP around 150 times) like this:- Which one is better in terms of performance? This is just an example for demonstration purpose...
- Modified
- 23 May at 12:28
Is it possible to extend the 'using' block in C#?
Is there a way to extend the `using` block in C# in such a way that takes a delegate as a second parameter alongside an IDisposable object and executes every time when an exception is thrown inside th...
- Modified
- 28 Feb at 18:29
AutoMapper 5.2 how to configure
What is the correct way to configure AutoMapper for global use. I want to set it once and then used though out the app. i have a strong feeling this is wrong. in fact i know this is wrong as this ca...
- Modified
- 28 Feb at 12:30
Update specific field in mongodb document
I using C# driver to use MongoDb in small projects, and now I stuck with updating documents. trying to figure out how to update the field (int) here is my code: ``` IMongoCollection<Student> studen...
- Modified
- 28 Feb at 11:32
Where do the parameters for KeyVaultClient.AuthenticationCallback Delegate come from?
I'm trying to call all the vaults in a subscription. The approach I'm using is this - Controller Helper For my controller "test.Token" always returns null but I can't help but think it may be from me ...
- Modified
- 11 Sep at 11:21
How to return custom message if Authorize fails in WebAPI
In my WebAPI project, I have number of apis which are decorated with `[Authorize]` attribute. ``` [Authorize] public HttpResponseMessage GetCustomers() { //my api } ``` In case user doesn't hav...
- Modified
- 28 Feb at 09:58
servicestack .netcore cannot resolve package
I am trying to open a .net core solution with servicestack dependencies, and for every servicestack dependency I am getting the message "The dependency ServiceStack.Core>=1.0.* could not be resolved"....
- Modified
- 28 Feb at 09:17
ServiceStack Javascript/Typescript client and CORS
According to the documentation, I believe this is the only line required to enable CORS: `Plugins.Add(new CorsFeature());` Then from a different website: ``` var client = new JsonServiceClient('htt...
- Modified
- 28 Feb at 02:43
How to debug Angular with VSCode?
How do I get configure Angular and VSCode so that my breakpoints work?
- Modified
- 27 Feb at 21:30
Migrate html helpers to ASP.NET Core
I'm converting a project to ASP.NET Core. I need to migrate lots of reusable html helpers, but html helpers do not exist in Core. Some are complex, some simple. Here's a extremely simple example: ``...
- Modified
- 27 Feb at 20:24
standard_init_linux.go:178: exec user process caused "exec format error"
docker started throwing this error: > standard_init_linux.go:178: exec user process caused "exec format error" whenever I run a specific docker container with CMD or ENTRYPOINT, with no regard to an...
How do I use string interpolation with string literals?
I'm trying to do something like ``` string heading = $"Weight in {imperial?"lbs":"kg"}" ``` Is this doable somehow?
- Modified
- 27 Feb at 18:46
Show Only Summary Section of BenchmarkDotNet
I'm benchmarking some .net framework stuffs, I'm using .net framework, C# and [BenchmarkDotNet](https://github.com/dotnet/BenchmarkDotNet) What I want to do is; I'm writing a lot of benchmark tests a...
- Modified
- 27 Feb at 18:1
Set Hangfire succeeded job expiry attribute not working
I am using Hangfire to do jobs, and I'd like to change the behaviour that succeeded jobs are deleted from the database after a day - I'd like them to be stored for a year. Following the instructions i...