EF 6 - How to correctly perform parallel queries
When creating a report I have to execute 3 queries that involve separated entities of the same context. Because they are quite heavy ones I decided to use the `.ToListAsync();` in order to have them r...
- Modified
- 19 Jan at 22:13
Google Protocol Buffers - serialize to byte array
I'm following the tutorial for using Google Protocol Buffers for C#. I don't see an example for converting an object into a byte array - does anyone know how to do that? I've auto-generated a FilePath...
- Modified
- 19 Jan at 19:17
pytest cannot import module while python can
I am working on a package in Python. I use virtualenv. I set the path to the root of the module in a .pth path in my virtualenv, so that I can import modules of the package while developing the code a...
.NET Dispatcher, for .NET Core?
Does something like `Dispatcher` exist for .NET Core? I need to create a thread in .NET Core, and be able to send actions to be invoked on the thread. Also, I'd like to be able to use a `TaskSchedule...
Best Practice - How to extend the DB in a ServiceStack.OrmLite .NET project?
I recently took a .Net project over which exposes `DAOs` from a Microsoft SQL Database via ServiceStack REST API. The server runs on IIS 7.5 In the `AppHost.Configure` the complete database schema is...
- Modified
- 19 Jan at 16:29
Fastest way to insert 100,000+ records into DocumentDB
As the title suggests, I need to insert 100,000+ records into a DocumentDb collection programatically. The data will be used for creating reports later on. I am using the Azure Documents SDK and a sto...
- Modified
- 23 May at 11:33
Scrolling to element using webdriver?
I am still learning and in response to one of my questions: [here](https://stackoverflow.com/questions/41737321/same-command-works-once-when-executed-but-throws-an-exception-when-executed-a-se?noredir...
- Modified
- 11 Nov at 12:7
Correctly awaiting in F# an async C# method with return type of Task<T>
I'd like to be able to consume a C# library from F#. Mostly this has been pretty straightforward. However, if I try to call a function that returns a `Task<T>` I am not able to get the returned value....
- Modified
- 19 Jan at 14:12
Using enum for dropdown list in ASP.NET MVC Core
I'm trying to create a dropdown list with an enum property in ASP.NET MVC Core using the tag helper in a Razor view: Here is the model: ``` public class PersonalMember : Member { [Required, Disp...
- Modified
- 3 Jan at 11:55
Working with multiple resultset in .net core
While retrieving the results using stored procedure how can I retrieve and store multiple result set in view model in .net core For e.g. from stored procedure I am returning records for below two que...
- Modified
- 20 Jan at 11:13
ServiceStack OrmLite Select with update lock
I have the following code: ``` protected static void InsertOrUpdate<T>( IDbConnection connection, T item, Expression<Func<T, bool>> singleItemPredicate, Expression<Func<T, object>> up...
- Modified
- 19 Jan at 13:37
Read appsettings.json in Main Program.cs
First of all my main purpose is to setup the IP and Port for my application dynamically. I'm using `IConfiguration` to inject a json config file, like some tutorial mentioned. However, I can't retri...
- Modified
- 19 Jan at 09:54
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled
My Autoconfiguration file is not working in Spring-Boot application. I attach my configuration application file below: ``` @Configuration @EnableAutoConfiguration @ComponentScan @SpringBootApplicatio...
- Modified
- 11 Sep at 08:34
How React JS index.js file contacting index.html for id references?
I recently get started with react. My contains ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> ...
- Modified
- 19 Jan at 09:46
ASP.NET/ServiceStack Root URL at startup
I'm trying to setup a ServiceStack template loosely based on the existing ASP.NET with razor template. The services to be created using this will be hosted in a variety of locations. What I would like...
- Modified
- 19 Jan at 09:33
EntityFramework insert speed is very slow with large quantity of data
I am trying to insert about 50.000 rows to MS Sql Server db via Entity Framework 6.1.3 but it takes too long. I followed [this answer](https://stackoverflow.com/a/5942176/2956448). Disabled AutoDetect...
- Modified
- 23 May at 12:34
How to throw an exception in an async method (Task.FromException)
I just discovered that, since .NET 4.6, there is a new method [FromException](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.fromexception) on the `Task` object, and I was wo...
- Modified
- 18 May at 01:39
Why can't I change my input value in React even with the onChange listener
I am quite new to React and after going through some tutorials, I was trying the below code of mine. I made one component, passed props to it from a store, on `componentWillMount` I make a new state f...
- Modified
- 27 Aug at 18:18
TempData null in asp.net core
I am trying to use TempData in asp.net core However I am getting a null value on the get method of TempData. Can anyone please let me know how can I use TempData in asp.net core Below are the things ...
- Modified
- 25 Jan at 11:19
Handle DTOs with interior objects when posting a file with request DTO to a server in servicestack
I am trying to pass both a file and a request DTO to servicestack using `JsonServiceClient` and it's `PostFileWithRequest<ResponseType>(fileStream, fileName, RequestType)` function. The issue arises...
- Modified
- 19 Jan at 02:8
GZIP in .net core not working
I'm attempting to add Gzip middleware to my ASP.net core app. I have added the following package : > "Microsoft.AspNetCore.ResponseCompression": "1.0.0" In my startup.cs for the Configure Service...
- Modified
- 19 Jan at 01:25
AuthenticationContext.AcquireTokenAsync
I would like to be programmatically able to get a token from Azure. I call `GetAToken().Wait();` and it fails. and the method is:
ISO UTC DateTime format as default json output format in MVC 6 API response
Does anyone know how to configure MVC6's json output to default to a ISO UTC DateTime string format when returning DateTime objects? In WebApi2 I could set the JsonFormatter SerializerSettings and co...
- Modified
- 3 Dec at 14:9
C# - Export .pfx certificate and import it later as a file
I basically need to export a `.pfx` certificate as a `Base64string`, store it in a database and recover it later, converting from `Base64string`. What I'm using at the moment is the `X509Certificate2`...
- Modified
- 7 May at 02:10
python pip on Windows - command 'cl.exe' failed
I'm trying to install spaCy using `pip install spacy` but I'm getting the following error .. [](https://i.stack.imgur.com/z2W1Y.png) I have VS 2015 installed, and I have the following Python install...