Gunnar Peipman's ASP.NET blog
ASP.NET, C#, SharePoint, SQL Server and general software development topics.
-
ExpectedException attribute in Visual Studio 2008 and Visual Studio 2010
Today I tried to write my first unit tests under Visual Studio 2010. Just to see if Visual Studio testing system can now also be used for unit tests. Visual Studio 2008 had some annoying problems with test and I preferred to use nUnit instead. Visual Studio 2010 brings some good news – tests work. Take a look at my example.
-
MyGallery2010
MyGallery2010 is my simple photo gallery system built on Visual Studio 2010 and .Net Framework 4.0 technologies. I don't have currently any public release of gallery but I hope that one day it is ready to release. Until this day you find here references to my postings where MyGallery2010 is mentioned. Those postings illustrate pretty well how I am building the gallery, how I design it and what decisions I make.
-
Analysis Patterns: Reusable Object Models
-
SharePoint: Creating HttpHandler for user profile images
I have custom authentication and user profiles solution where user profiles are stored in list. This list is directly accessible only to administrators. Users can register to site and modify their profiles through special pages that run profile operations under elevated privileges. Users have three versions of their avatar: 64x64, 32x32 and 16x16. These avatars are saved as user profile attachments when user uploads his or her avatar. Because avatars are used at almost every page in portal I wrote IHttpHandler that provides avatars based on user profile ID.
-
Entity Framework 4.0: Generating SQL script from model
Entity Framework 4.0 is able to generate database schema based on model. If you built your model first and you now want to create database for it you can use new Generate Database Script from Model feature. Let’s see how it works.
-
Reordering invoice lines using jqGrid and TableDND extension
In one of my ASP.NET MVC applications I needed flexible interface for inserting invoice lines. Sometimes invoice lines are inserted in incorrect order and it saves accountants some time if they are able to change the order of invoice lines quickly. In my application I used jqGrid with TableDND extension. Here’s how I got it work.
-
Attaching SQL Server database without log file
I needed to attach SQL Server 2008 database to server. There was no log file, just mdf. I don’t know why but it is not very easy to get this database online. After some digging in internet I found solution.
-
What do you think of my ASP.NET MVC gallery layouts?
To try out Visual Studio 2010 and .Net Framework 4.0 I decided to write simple gallery application based on ASP.NET MVC Framework. In this posting I show you my very first layouts I created for gallery. These layouts are modifications of ASP.NET MVC default blue-white-black layouts. I also added some photos of my first layout drafts. My question is – what do you think about my first draft-level layouts (I am not designer)?
-
Last screen of Windows 7 beta
My Windows 7 Beta is expired. After about two hours of work computer restarts. During restart it shows me the following BSOD.
-
Entity Framework 4.0: On the way to Composite Pattern
In my last posting about Entity Framework 4.0, Entity Framework 4.0: POCOs and table-per-type inheritance mapping, I made first generalization to my photo gallery model. I introduced GalleryItem class that is base class for all that can be added to gallery: new albums, photos and maybe videos too. Although everything works as expected my model needs some modifications because it is not very foolproof.