NOW() in ServiceStack.OrmLite
Question is in the title. I have T4 generated objects, but how would I Save() or Update() an object while setting its "LastAccess" property to the sql function "NOW()"? I don't want DateTime.UtcNow, ...
- Modified
- 14 Jul at 00:35
How to use promise in forEach loop of array to populate an object
I am running a forEach loop on an array and making two calls which return promises, and I want to populate an object say `this.options`, and then do other stuff with it. Right now I am running into th...
- Modified
- 13 Jul at 21:58
Is there a newer version of the ServiceStack ProtoBufServiceClient example?
I'm using 4.0.60 of ServiceStack and wanted to implement a service client to use Protobuf format, I tried this [example](https://github.com/ServiceStack/ServiceStack/wiki/Protobuf-format) from the doc...
- Modified
- 14 Jul at 16:28
Built-in method to convert a string to title case in .NET Core?
The .NET has a method [TextInfo.ToTitleCase](https://msdn.microsoft.com/en-us/library/system.globalization.textinfo.totitlecase.aspx). Is there something equivalent in .NET Core? Edit: I'm looking ...
Access appsettings.json values in controller classes
Having trouble figuring out how to read appsettings.json values outside of the startup.cs. What I would like to do is, for instance, is in the _Layout.cshtml, add the site name from the config: For e...
- Modified
- 13 Jul at 18:28
Type argument 'System.Net.Http.Headers.MediaTypeHeaderValue' violates the constraint of type parameter 'T'
I have a Web API solution (targeting .NET 4.6) with a couple of fairly lightweight .NET Core projects in it. I've packaged the .NET Core projects up as a NuGet package and installed them to the Web AP...
- Modified
- 14 Jul at 09:38
Could not find method named Get(Login) or Any(Login) on Service
I get the following error when trying to send an HTTP POST request to my login endpoint: "Could not find method named Get(Login) or Any(Login) on Service LoginService" The Login class has three pro...
- Modified
- 13 Jul at 13:18
Is there any way to get Firebase Auth User UID?
I am looking to fetch Auth User(s) UID from Firebase via NodeJS or Javascript API. I have attached screenshot for it so that you will have idea what I am looking for. ![enter image description here](...
- Modified
- 13 Jul at 13:18
Get Image from the Gallery and Show in ImageView
I need to get an image from the gallery on a button click and show it into the imageview. I am doing it in the following way: ``` btn_image_button.setOnClickListener(new View.OnClickListener() { ...
- Modified
- 13 Jul at 12:45
Why comparing two strings as object causes unexpected result
Consider the following piece of code. ``` object str = new string(new char[] { 't', 'e', 's', 't' }); object str1 = new string(new char[] { 't', 'e', 's', 't' }); Console.WriteLine(str==str1); // fal...
- Modified
- 13 Jul at 11:52
Spring Data and Native Query with pagination
In a web project, using latest spring-data (1.10.2) with a MySQL 5.6 database, I'm trying to use a native query with pagination but I'm experiencing an `org.springframework.data.jpa.repository.query.I...
- Modified
- 6 Mar at 09:48
Open generic type arguments cannot be inferred from the usage
For demonstration purposes and completeness, the following classes are used (): ``` public class A { public IEnumerable<B> B { get; set; } } public class B { public IEnumerable<C> C { get; ...
- Modified
- 18 Jul at 16:47
Newtonsoft.JSON v9.01 + FileNotFoundException (.NET Core Class library)
(VS2015 Update 3 + Patch) I have a plain .NET console application (.NET 4.6) and reference a .NET core class library that targets NetStandard v1.3. The class library has a reference to Newtonsoft.JSO...
Why does Google.Pubsub.V1 beta01 not work with dotnet cli projects?
I have created a very simple program which should list the topics available in a Google Cloud project. The code is trivial: ``` using System; using Google.Pubsub.V1; public class Test { static v...
- Modified
- 8 Sep at 06:10
nginx docker container: 502 bad gateway response
I've a service listening to 8080 port. This one is not a container. Then, I've created a nginx container using official image: ``` docker run --name nginx -d -v /root/nginx/conf:/etc/nginx/conf.d -p 4...
Run triggered Azure WebJob from Code
I created a console application upload as Azure trigger Webjob. It is working fine when I run it from Azure Portal. I want to run this from my C# code. I don't want to use Queue or service bus. I just...
- Modified
- 13 Jul at 08:11
Xamarin DependencyService: System.MissingMethodException: Default constructor not found for [Interface]
I am receiving this error when using the Dependency Service on a `Xamarin.Forms PCL`. I have seen answers to this error that involve `iOS` and the `Linker`. However, I am running this on `Android` and...
- Modified
- 13 Jul at 04:44
A reference to could not be added ´. An assembly must have a dll or exe extension in order to be referenced
I have plain c# console application (.NET 4.6) where I want to reference a .NET Core Class Library: ``` { "version": "1.0.0-*", "dependencies": { "NETStandard.Library": "1.6.0", "Newtons...
LiteDB: Invalid BSON data type 'Null' on field '_id'
Using [LiteDB](http://litedb.org), and it is amazing. It works well for loading and storing data, however, not on subsequent loads after the database has been created. On initial load, everything is ...
How do I pass a RefId to the UserAuthDetail table in Servicestack?
I see that servicestack supports passing an int? RefId and string RefString in both the Userauth table and the UserAuthDetail table. I have hooked up my sign-up/sign-in process to facebook, but when i...
- Modified
- 13 Jul at 00:57
Library NuGet configuration is invalid
VS2015 Update 3. I created a plain .net core class library. Right-click on Project->References-> Manage Nuget packages throws the following error? What is missing? [](https://i.stack.imgur.com/ELVX...
- Modified
- 12 Jun at 09:14
Single letter words in camelCase, what is a standard for handling these?
I'm trying to group together an object's vertex X components in a vector, like structure of array style. Naturally this is the way. ``` Vec xComponents; or Vec xVals; or simply Vec x; ``` However...
- Modified
- 12 Jul at 23:39
How to decode JWT Token?
I don't understand how this library works. Could you help me please ? Here is my simple code : ``` public void TestJwtSecurityTokenHandler() { var stream = "eyJhbGciOiJSUzI1N...
- Modified
- 18 Dec at 10:47
NSubstitute - mock throwing an exception in method returning Task
Using [NSubstitute](http://nsubstitute.github.io), how do you mock an exception being thrown in a method returning a Task? Let's say our method signature looks something like this: ``` Task<List<obj...
- Modified
- 7 Mar at 23:4
Conflict between System.IdentityModel.Tokens and Microsoft.IdentityModel.Tokens
I have a conflict when using System.IdentityModel.Tokens : ``` using System; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.IdentityModel.Tokens; using System...