Technolog

Blogging over technologie.
Welcome to Technolog Sign in | Join | Help

Search

You searched for the word(s):
Showing page 1 of 3 (24 total posts) < 1 second(s)
  • Finally OData 7.x supports and ASP.NET Core 2.x

    Finally we can create OData (v4) services using ASP.NET Core. My first impression, its ok, plus it has extra features. Use my startup project, on Github as a sample. (Its tricky to forget to enable features like Filter, otherwise youll and up with : value&quot;:&quot;The query specified in the URI is not valid. The property 'Id' cannot be ...
    Posted to Egbert Nierop technolog (Weblog) by eprogrammer on January 16, 2018
  • Howto open ("/dev/urandom") on Windows

    Just copy-paste might save you some time. rand_s is pretty safe on Windows since it uses RtlGenRandom(), but youll have to define _CRT_RAND_S first before &lt;stdlib.h&gt; Assuming that the cpp somewhere in the class has: m_fd = open(&quot;/dev/urandom&quot;, O_RDONLY); Original code: (thanks jacketzhong) sds CRedLock::GetUniqueLockId() { ...
    Posted to Egbert Nierop technolog (Weblog) by eprogrammer on November 6, 2017
  • Howto get the ASP.NET Core ContentRoot path?

    &#160; There are 3 ways that I have found to be working within Startup.cs use Environment variables.&#160; This however, only works if you also have added the environmentvariables. (builder.AddEnvironmentVariables(); ) var env = Configuration.GetSection(&quot;ASPNETCORE_CONTENTROOT&quot;); var path =&#160;&#160;&#160;&#160; ...
    Posted to Egbert Nierop technolog (Weblog) by eprogrammer on September 10, 2017
  • ASP.NET Core MVC. Howto set Casing strategy for JSON

    While converting a previous piece of code, written using Mvc 4.x I found that the output of the Json previously, when set no option, was unchanged, so a class with a property say, Name would output in JSON as Name. However, ASP.NET Core Mvc when returning JSon results, it now defaults to camelCasing. &#160; My output had to be: { ...
    Posted to Egbert Nierop technolog (Weblog) by eprogrammer on September 10, 2017
  • Give your C# class Initializer support

    Would you like a to boost your class which hosts a collection, and utilize a cool C# language feature, which is collection initializer support? For instance var myList = new List&lt;int&gt;() {1,3,4} where {1,3,4} is the initializer. The basic idea is to implement IEnumerable&lt;T&gt;, and IEnumerator&lt;T&gt; and the class must have an Add ...
    Posted to Egbert Nierop technolog (Weblog) by eprogrammer on May 20, 2017
  • OData 6.0.0 howto fix Cannot apply PATCH to navigation property 'x' on entity type?

    The Microsoft OData library Roadmap? Please some insights? Microsoft has taken the road of open source and the community. Right, but I guess that this is the reason, that some libraries, in the past maintained by strictly managed teams, now are more or less loosely managed. About OData and bugs and questions, I have seen comments in the ...
    Posted to Egbert Nierop technolog (Weblog) by eprogrammer on April 30, 2017
  • Howto: Azure DocumentDB update/delete objects, without SelfReference

    Inherit Microsoft.Azure.Documents.Resource? No We can be short, just dont. If you do, your library gets bloated and you need to add references to documentdb to cross-reffed libraries as well, because of the Resource dependency. Use a POC based base object? Yes If you implement DocumentDB for the first time, youll quickly find that ...
    Posted to Egbert Nierop technolog (Weblog) by eprogrammer on April 3, 2017
  • How to parse and read web.Config or app.Config in C++/on Windows

    Just a tiny gem, which not often would be required but it can save you some time. It also demonstrates the power of the IXmlReader in unmanaged code. Because, as far I am aware of, the processing time a .config file measuring it with TickCount always is 0 ms (too small to measure). Microsoft has optimized the XML Reader implementation for fast ...
    Posted to Egbert Nierop technolog (Weblog) by eprogrammer on June 7, 2015
  • How to convert WCF REST services to Web API 2 (ASP.NET)

    &#160; Why convert WCF REST services anyway? First: WCF REST processes JSON using (by default) the DataContractJsonSerializer, while Web API 2 (by default) uses NewtonSoft JSON, which today is the best choice. Secondly: WCF more or less runs in ASP.NET context, using a HttpContext hack plus routing to a WCF service is much more complex ...
    Posted to Egbert Nierop technolog (Weblog) by eprogrammer on December 19, 2014
  • The Ultimate T-SQL String Splitter (function)

    &#160; I just want to share this function, since there are a lot of version around, which are not resistant against zero positions advance, for instance, if you split 1,2,3 into a table, it would be find, but what if one element is empty, such as 1,,3? This function deals with it setting returning a null element. Usage: SELECT * FROM ...
    Posted to Egbert Nierop technolog (Weblog) by eprogrammer on August 28, 2014
1 2 3 Next >
Powered by Community Server, by Telligent Systems