How to call JavaScript functions from Typescript in Angular 5?
I'm working on PDF Viewer development in Angular 5. I'm done with writing HTML code for the UI part. Now I've JavaScript files that provide functionality for the UI elements. As Angular 5 supports typ...
- Modified
- 22 Dec at 05:4
Is there a data annotation for unique constraint in EF Core (code first)?
I am wondering if there is a data annotation for unique constraint in Entity Framework Core 2 code first approach?
- Modified
- 28 Mar at 14:43
Inline variable declaration doesn't compile when using '== false' instead of negation operator
Consider the following snippets: ``` void Foo(object sender, EventArgs e) { if (!(sender is ComboBox comboBox)) return; comboBox.DropDownWidth = 100; } ``` compared to ``` void Bar(object ...
CsvHelper Ignore case for header names
I have some class ``` public class Import { public DateTime Date { get; set; } public string Category { get; set; } } ``` In csv file header names can be in lowercase. How I can ignore cas...
ServiceStack 5.0 AuthenticateAttribute.Execute() now returns a Task
I just upgraded to ServiceStack 5.0 from 4.0. The breaking change is that now my Execute() method that overrides AuthenticateAttribute.Execute() doesn't work because `'AuthenticateAttribute' does not...
- Modified
- 27 Mar at 19:29
Default interface methods are only supported starting with Android 7.0 (Nougat)
I upgraded to Android Studio 3.1 and I'm getting the following error: > Default interface methods are only supported starting with Android N (--min-api 24): void android.arch.lifecycle.DefaultLifecycl...
SOAP with service fabric - Https and Http binding
I'm currently developing a service fabric app that will expose a soap listener that will be consumed by another app I keep getting an error saying > Could not find a base address that matches schem...
- Modified
- 15 Apr at 13:47
servicestack ormlitecache on sqlserver cacheentry primary key
In my web application i have used servicestack ormlite cache client on sql server. Yesterday my sql server get stuck at 99% of CPU and the thing that helped me to restore everything was to delete cach...
- Modified
- 27 Mar at 08:11
SSE with ServiceStack not working with netscaler
Our application uses ServiceStack and exploits SSE. One of customer's site tries to use the application behind Netscaler, however event-stream connection aborted each time the request is issued from c...
- Modified
- 27 Mar at 05:3
MVC Core IActionResult meaning
What is an `IActionResult`? I tried looking at MSDN and other sites, but need general, common easy to understand answer. [MSDN IActionResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.as...
- Modified
- 27 Mar at 04:34
Visual Studio Code run individual .cs files
Is there a way we can run individual *.cs* files in Visual Studio Code. I have followed this link and runs fine but then I added *Program2.cs* and try to run using "dotnet run Program2.cs" but it fail...
- Modified
- 16 Jul at 10:21
Auto format C# code In Visual Studio Code
I have enabled the latest C# extension in my Visual Studio Code editor. Instead of formatting the code while saving or by applying the key combination + , + or + + , I need to format the current ...
- Modified
- 23 Jun at 14:45
How can I stop a Tag Helper from being used automatically?
For example: I want my `` tag to render as-is. Instead it is auto-generating all the other goodies with it. How do I turn off tag helpers for that one specific tag?
- Modified
- 3 May at 05:12
Pointer offset causes overflow
The following results don't make any sense to me. It looks like a negative offset is cast to unsigned before addition or subtraction are performed. ``` double[] x = new double[1000]; int i = 1; // f...
VS2017 and NUnit 3.9 No test is available
I am using the latest VS2017 version 15.6.4, NUnit3TestAdapter 3.10.0 and Nunit version 3.9.0.0. When I try to run a unit test in Test Explorer the test are grayed out, when I right click and and ru...
- Modified
- 26 Mar at 16:32
ServiceStack and Auth0
I am looking to use Auth0 as the authentication provider for ServiceStack. There is a great sample application documented at Auth0 which applies & works well when working with ServiceStack and using S...
- Modified
- 26 Mar at 14:54
How to use a custom model binder with Swashbuckle, Swagger and NSwag?
I have an ASP.NET Core Web API that contains the following endpoint. ``` [HttpGet] [Route("models/{ids}")] [Produces(typeof(IEnumerable<Model>))] public IActionResult Get ( [ModelBinder(typeof(Cs...
- Modified
- 26 Mar at 14:52
Union types in Java
I've been working with C# for a while and trying to get more familiar with Java. So I'm trying to migrate some of the basic patterns I use on daily basis in C# even only to understand the gap between ...
- Modified
- 16 Dec at 00:23
Use SqlGeography at ServiceStack.OrmLite in .Net Core
I try to add SqlGeography to my model and when I call create table I got weird error. First I add this package: `Microsoft.SqlServer.Types` Then I create my model like example at below: ``` public ...
- Modified
- 25 Mar at 19:47
Plugin system security in .NET Framework 4.x (without CAS)
What I'd like to achieve is a plugin system with the following features: - - - - During my search, I've mostly found SO solutions involving Code Access Security which, as far as I know, is outdated...
- Modified
- 27 Mar at 19:33
Windows doesn't recognize Docker command
I already installed Docker for windows. when I type `docker --version` command in Command prompt, it doesn't recognize it at all. The message will be this: ``` 'docker' is not recognized as an inte...
- Modified
- 25 Mar at 16:53
Azure Durable function - InvalidOperationException when CallActivityAsync
I'm playing around with the [Azure Durable functions](https://learn.microsoft.com/en-us/azure/azure-functions/durable-functions-overview). Currently I'm getting `InvalidOperationException` within Orch...
- Modified
- 24 Aug at 00:36
ServiceStack casting response to CompressedResult throws OutOfMemoryException
I have json data that is being compressed using ServiceStacks's inbuilt ToOptimizedResult method. This has been working fine for a while now, recently though, when the data to be returned is high (50k...
- Modified
- 25 Mar at 12:23
Failed to auto-configure a DataSource: 'spring.datasource.url' is not specified
I have created a basic spring boot application from with the Web, MongoDB and JPA dependencies. When I try to run the spring boot application I am getting the following exception: ``` Error starti...
- Modified
- 11 Apr at 13:3
How to downgrade Flutter SDK (Dart 1.x)
I upgraded my Flutter SDK and now my project is broken. I need to basically revert back to a Flutter SDK which uses Dart 1.x. I tried the following in the pubspec.yaml, ``` environment: sdk: ">=1...
- Modified
- 24 Mar at 18:26