In one of my previous posts, I detailed using Table Value parameters. That method works great for my uses. However, I ran into one gotcha worth pointing out.
Ramblings of a software developer..
posted on January 18, 2017 by long2know in ASP.NET, Database
In one of my previous posts, I detailed using Table Value parameters. That method works great for my uses. However, I ran into one gotcha worth pointing out.
posted on January 2, 2017 by long2know in ASP.NET, Entity Framework
One deficiency with Entity Framework is the ability to load data from a stored procedure or a direct query when the column names don’t match your model property names exactly. In one of my previous posts, I detailed how the EF API can be used to retrieve column mappings. These column mappings can be used in conjunction with a SqlDataReader to map a query result, properly, to your EF model.
posted on December 16, 2016 by long2know in ASP.NET, Database, Entity Framework
In a previous post, I demoed how to use Table Valued Parameters (TVP’s) with EF. This works great, but, if you’ll notice, it only suppports one-column TVP’s with a simple scalar list of values. I expanded this a bit.
posted on November 1, 2016 by long2know in angular, ASP.NET, JavaScript, WebApi
In an application that I’m currently working on, that deals with Sales data, there are instances when I need to apply date comparisons relative to a user’s local time. This is an interesting problem with which to deal.
posted on October 20, 2016 by long2know in Ninject
Ninject is one of the better dependency injection frameworks, IMHO. However, within the context of .NET Threads and thread pooling, scoping of objects doesn’t work quite as expected.
posted on September 26, 2016 by long2know in ASP.NET
For services that I write that repeat a task over a set interval, I generally use a simple repeater loop. For the cases where I needed a bit more granular control of how/when Tasks repeat, I created a simple scheduler with a Fluent API.
posted on September 8, 2016 by long2know in ASP.NET
.NET doesn’t have a very good way, that I’m aware of, to limit the number of Tasks/Threads that can be running at a single time. This can create issues where, for example, you are queuing up thousands of jobs that run against a finite set of resources.
posted on August 5, 2016 by long2know in ASP.NET, MVC
ASP.NET’s built in CSRF (Cross-site request forgery) is pretty straight forward. You add a token to your views via an HTML Helper, and then decorate your controller actions with a specific attribute to validate the token on POST. There are many times, seemingly randomly, where users have invalid tokens on their requests. MVC throws a 500 error with an HttpAntiForgeryException. For legitimate users, this is not an optimal experience.
posted on July 27, 2016 by long2know in ASP.NET
A while back, I blogged about a pattern of accessing API’s with .NET’s HttpClient. In practice, one problem with .NET’s HttpClient is that it doesn’t provide any insight regarding Http redirects.
posted on July 11, 2016 by long2know in ASP.NET, Core
With OWIN and .NET 4.6.x, it was pretty straight forward to enable SSL (TLS), and redirect all requests to the HTTPS end-point with Visual Studio’s tooling (IIS Express). It’s not quite as straight forward to accomplish this in .NET Core.