EF 4.1 introduces two new features
- The DbContext API is a simplified abstraction over ObjectContext and a number of other types
- Code First is a new development pattern that provides an alternative to the Database First and Model First patterns
Code First is focused around defining your model using .NET classes. These classes can then be mapped to an existing database or be used to generate a database schema. Additional configuration can be supplied using Data Annotations or via a fluent API. Continue reading “How to create a Code-First EF model”
We’ve all heard at one point ransomware being mentioned – computers hijacked by evildoers and then encrypted with a key which was available at a cost to the unaware user.
People have been asking – how does it spread? Can it come through the network? Is it a download or an exe file you have to click to get it on your machine?
What makes ransomware so effective? Continue reading “How does ransomware work?”
This article describes a method to automatically copy data from an object to another object with similar structures. This is similar to a
deep_copy(source, destination) but with the possibility of returning a type that is different from the source.
I needed a way to apply/convert values from one object to another so I created a method to automatically drill down the source object graph and copy the properties from one object to another. There are many ways to do this, but I designed a method that is generic enough and also leaves place for customization/fine tuning/hacking. Continue reading “Method to Copy Data Between Objects of Different Types”
ASP.NET and IIS scale very well, but you’ll need to change a few settings to set up your server for lots of concurrent connections, as opposed to lots of requests per second. Continue reading “Performance tuning IIS for multiple concurrent threads”
Acquiring additional inbound links is the common solution that helps solve most of the problems that SEOs run up against. To make this difficult task a little easier for you, I have compiled a list of some of my favorite link building techniques. Not all of these techniques work for all people, but the list is long enough that you can almost undoubtedly find a technique that works for your case. Continue reading “Link Building Techniques”
Here’s a challenge for you. Using only one line of code, remove all the empty lines in a data table.
Empty is defined by a Null value or an empty string (/whitespace).
DataTableObject = DataTableObject.Rows.Cast(Of DataRow)().Where(Function(row) Not row.ItemArray.All(Function(field) TypeOf field Is System.DBNull OrElse String.Compare(TryCast(field, String).Trim(), String.Empty) = 0)).CopyToDataTable()
CPanel is an easy user-interface site that lets you control your host account environment. The main peculiarity of this operating system is that it so simple to use that your below average computer user can’t mess it up. It’s got great features embedded into its panel and some of the features are listed below.
Continue reading “Using cPanel to Manage Your Host Files”