Currently Browsing Category 'C#'

Working with dynamic actions and Partial Views in the CODE Framework – Part 1

by Joseph on Jan 23rd in .Net, C#, CODE Framework, WPF, XAML

Recently, I had a need to create a CODE Framework application with partial views, which included different ViewActions based on which Partial View was visible at the time. I found it to be a fairly interesting problem, and decided to share my solution. Since I obviously can’t blog with pictures of the customer application, I […]

NHibernate talk at NHDNug

by Joseph on May 22nd in .Net, C#, NHibernate, North Houston .Net User's Group

I recently delivered a presentation at North Houston Dot Net User Group regarding NHibernate and some Advanced ORM Topics. I covered several topics related to NHibernate and ORMs in general: Data Impedance Mismatch Impedance Mismatch Sources Problem Domains Data┬áPersistence Impedance Mismatch Reduction Persistence Ignorance Lazy Loading Difference between “Heavy-Weight” and “Light-Weight” ORMs And of course, […]

Entity Framework Eager Loading

by Joseph on Jul 7th in .Net, ADO Legacy, C#, Entity Framework, LINQ

So I REALLY hate the way that Entity Framework does the Eager Loading system. One of the biggest things gained from EF over legacy ADO was the fact that queries have compile-time checking. With the .Include(string s) method, we end up back in the same place we started. I’m hoping things are fixed when .Net […]

Foreign Key relationships in Entity Framework

by Joseph on Jul 6th in .Net 3.5, C#, Entity Framework

I received the following error while trying to use Entity Framework to update an object. The property ‘AccessLevelID’ is part of the object’s key information and cannot be modified. The object is a User, who has an AccessLevel foreign key. The problem was in my code, which looked like this: user.FullName = FullName;user.LoginName = LoginName;user.Password […]

C# Plugin Architecture

by Joseph on May 12th in Architecture, C#, DLLs, Plugins

Working with DLLs and C# plugins can be an interesting problem. In our particular case, I needed to be able to drop in a dll (not known at compile time) based on a known interface, and have it discovered an run during runtime. I found the following video that made everything crystal clear:http://www.johnkoerner.com/index.php?/archives/43-Creating-a-Plugin-Architecture-in-C.html Other interesting […]

Email Queue

by Joseph on May 3rd in C#, EMail, QUEUE, SMTP

So I was thinking about the situation of one of the websites I work with. The website is on a separate server from the SMTP server, so requests for information, purchases, etc. risk getting dead air. I chose to solve this problem by setting up a fairly simple queue on the web server. Essentially, any […]

Geting started with Entity Framework

by Joseph on Apr 21st in ADO Legacy, C#, Entity Framework

So I wrote my first Linq to Entity Framework query today. Took a little bit of research to really understand what was happening, but here goes my explanation: using (DataBase db = new DataBase()) // Relatively obvious… This sets up the data connection. { //var letters = db.Receipt_View; // A custom MSSQL View based on […]

Getting started with Test Driven Development

by Joseph on Apr 19th in C#, Euler Project, mbUnit, Test Driven Development

So I decided today that I would knock out two birds with one stone: Get started using Test Driven Development so that I can learn how to use it in an upcoming project Start earning “street cred” by solving the Euler Project puzzles. I’ve been putting off TDD due to fear, consternation, and general trepidation […]

Introduction of Silverlight 3

by Joseph on Apr 17th in .Net, C#, Entity Framework, Houston Tech Fest, North Houston .Net User's Group, Silverlight, Silverlight 3, Web Development

Yesterday was the April meeting for North Houston .Net User’s Group.Tony Champion introduced us to the benefits of developing Rich Internet Applications in Silverlight 3. While I haven’t done any SL3 applications in the past myself, his demos showed a remarkably robust data-driven form application that he wrote using Entity Framework and Silverlight, and it […]

Define a Hexadecimal number in C#

by Joseph on Dec 12th in C#, hex, hexadecimal, integer, literal hex

This one took me a bit of searching… To represent a literal hex number (i.e. “FF”), is like this:int h = 0xFF;Preface the hex # with a “0x” and it treats it as hex. Much like C++ actually…

Powered By Wordpress Designed By Ridgey