Previous posts can be found here: Part One – The Beginning Part Two – The Domain Model In part two we set up our domain model. Now, before we can test nhibernate’s ability to work with and persist objects, we need to ensure that we’ve defined our schema well enough that NHibernate can create the Schema for us (since that was kind of the point). Now is where NUnit starts to become very useful.
This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.
Which books should you read/buy when you are a programmer? I have listed 5 books that have helped me a lot. The books that I have chosen are not specific to any language although some of the books have examples in one language only. Design Patterns has examples in smalltalk and C++ but since the code is not very complicated you should have no problem converting it to your language of choice.
Channel 9 has two screencast that deal with the new geography data type in SQL Server 2008. Saving Virtual Earth Polygons to SQL Server 2008 Marc Schweigert shows you how to draw a polygon on a Virtual Earth map and save it using ASP.NET AJAX, Windows Communication Foundation (WCF), LINQ to SQL, and the new geography data type in SQL Server 2008. Rendering Polygons from SQL Server 2008 on Virtual Earth
Lets say I have a class teacher which inherits from a class person (hard to believe I know ;-)). And we want to bind a list of Iteachers (the interface) to a datagridview because that is the easiest way of getting things working for the datagridview. This will give a surprising (perhaps not) result. First lets look at the Person class and IPerson interface. Public Interface IPerson Property Name() As String Property FirstName() As String End Interface Public Class Person Implements IPerson Private _name As String Private _firstname As String Public Sub New() End Sub Public Sub New(ByVal Name As String, ByVal Firstname As String) _name = Name _firstname = Firstname End Sub Public Property Name() As String Implements IPerson.
Part One – The Beginning In part one we discussed what has brought me to the shameful point of using an object-relational mapper. At the risk of being ostracized from the database community, I really think this is going to be helpful for my project. The next step is to actually build up the domain model, and set up the mappings for NHibernate. I won’t be pasting all the code in here, but I will be attaching the project itself to the next post if anyone’s interested.
After writing about the extensions methods for a string (the basic stuff) I was having so much fun that I decided to write another one. This time for an image. I always thought the getThumbnail method of the image class was to difficult to use and to hard to remember. So I extended Image and added a ToThumbnail method to it. First I wrote some unittests (of course) ```vbnet Imports NUnit.
This article is based on something Jeff Atwood did. It reminded me of something I missed an something that could save me some time. I need a simple left and right method on a string variable. So I went about and did it ;-). First I googled around a bit to find out how I should do it in VB.Net (plenty of c# examples can be found). And I found this blogpost by Chris Rock which helped a lot.
It can be usefull to be able to create an instance of a class via reflection. I wouldn’t use it to much because it has a code smell. But anyway. I wrote this little windowsapplication that creates some controls. This is the code in that form. Imports System.Reflection Public Class Form3 Dim controlsList As List(Of Control) Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Not String.
Microsoft Security Bulletin MS08-040 Important Vulnerabilities in Microsoft SQL Server Could Allow Elevation of Privilege (941203) This security update resolves four privately disclosed vulnerabilities. The more serious of the vulnerabilities could allow an attacker to run code and to take complete control of an affected system. An authenticated attacker could then install programs; view, change, or delete data; or create new accounts with full administrative rights. This security update is rated Important for supported releases of SQL Server 7.
Tibor Karaszi has created a very useful index information stored procedure for SQL Server 2005 and up. This stored procedure will tell you the following” What indexes exists for a or each table(s) Clustered, non-clustered or heap Columns in the index Included columns in the index Unique or nonunique Number rows in the table Space usage How frequently the indexes has been used Check it out here: http://www.karaszi.com/SQLServer/util_sp_indexinfo.asp