Quick Way to Create C# Models from SQL Tables

misc1Recently, I was working on a project which used SQLCommands and I need to import a few SQL tables to start using as models. The tables were pretty large so I didn’t want to type them in manually. After a bit of searching, I found something on Stack Overflow that helped me out. Link

The code is pretty simple. You execute it against your table and it’ll output a C# class with all properties based on the table’s columns:

Continue reading “Quick Way to Create C# Models from SQL Tables”

ASP.Net Identity Generate Token Weirdness (Tokens become invalid seemingly at a random interval)

misc1We’re working on an ASP.Net project that uses Identity to handle user authorization and had an interesting issue when creating temporary email confirmation tokens.

The tokens are generated via the Use-Manager’s function “GenerateEmailConfirmationTokenAsync”. Then we add that token to a link which is emailed to the user.

Periodically, these tokens were coming back as being invalid and a search on the issue came up with some interesting reasons.

Continue reading “ASP.Net Identity Generate Token Weirdness (Tokens become invalid seemingly at a random interval)”

Streaming Video Content to a Browser using Web API

misc1Recently, a client reached out to me that their video streaming wouldn’t allow for seeking (fast-forward & rewind).  Not knowing a lot about streaming, I did some google searching and found out that if the API is not setup to support seeking, then it will not work.

I found a great starting point for this:


Continue reading “Streaming Video Content to a Browser using Web API”

ASP.Net Identity EF Users Primary Key Change

misc1Recently, I worked on converting a .Net API from a 3rd party authentication mechanism to internal and we chose to use the Identity framework.  By default, Identity uses a string as the primary key for the AspNetUsers table and that was an issue because our current users table used a long (and there were a lot of foreign key references to it).

Continue reading “ASP.Net Identity EF Users Primary Key Change”

Why I’m never buying another Dell, and why you shouldn’t either

misc1I’ve been a software developer going on 12 years and it has been great.  As such, I’m the family computer guy, which I don’t mind because it helps keep me up on current hardware technology (I have a masters in EE so I like that stuff).

Recently, my mother came to me with an issue with her Dell laptop.  It seems that the hard drive stopped working.  Pretty simple to fix since it used a 2.5″ SATA drive.  I went to the local Microcenter and grabbed a 240Gig SSD to replace it with.  (SSD’s are soooo cheap these days!)

My mother brought over her computer and I proceeded to install the hard drive and then I was looking for her box for the restore disk…  Oooh lala they don’t provide a restore disk with their computers anymore.

Continue reading “Why I’m never buying another Dell, and why you shouldn’t either”