Vort3X

Stories submitted by Vort3X

NHibernate and Execution Plans(objectreference.net)

submitted by Vort3XVort3X(1335) 2 years, 3 months ago

Lately we have been investigating ORM’s (Object Relational Mapping) frameworks for use on a large enterprise level website which we been given the rare opportunity to rebuild from the ground up in Microsoft MVC. We decided to go ahead with NHibernate until stumbled across a major issue causing queries run by NHibernate not re-using SQL Server execution plans. read more...

add a comment |category: |Views: 275

tags: another

Learning new Programmming Languages and Technologies(objectreference.net)

submitted by Vort3XVort3X(1335) 2 years, 8 months ago

Recently, I’ve read article after article about how part of being a good software developer is about being open to new technologies, and to “learn new things” – and I’d be foolish not to agree. However... read more...

add a comment |category: |Views: 460

tags: another

RegEx Multiple Matches with Lookahead Assertion(objectreference.net)

submitted by Vort3XVort3X(1335) 3 years, 2 months ago

This is a quick article where I would like to show how to use regular expression to get all matches of a particular pattern from the string. read more...

add a comment |category: |Views: 236

tags: another

SQL Find last week date range(objectreference.net)

submitted by Vort3XVort3X(1335) 3 years, 2 months ago

The other day we needed to write a report on online sales for the last week. SQL doesn’t offer developers many predefined functions to work with date ranges unlike the C# programming language. Here is a little example how to query SQL for some data between the dates for the last week. read more...

add a comment |category: |Views: 438

tags: another

Managment Studio 2008 Intellisense on SQL Server 2005 Databases(connect.microsoft.com)

submitted by Vort3XVort3X(1335) 3 years, 5 months ago

The RTM version of the product will not support intellisense for 2000 or 2005 instances. While I understand the exclusion of SQL 2000 as it is no longer a supported version I believe SQL 2005 should be included. Many development shops will have versions of 2005 and 2008 running. read more...

add a comment |category: |Views: 17

tags: another

ListBox Extension Method for Get and Set Selected Values(objectreference.net)

submitted by Vort3XVort3X(1335) 3 years, 6 months ago

ASP.Net ListBox control allows two types of selection mode: single and multiple. Working in single selection mode is similar to working with DropDown list control. Use ListBox.SelectedValue to get the value that was selected by a user. In order to set a selection SelectedIndex property can be used or Selected property of a particular item should be set to true. read more...

add a comment |category: |Views: 47

tags: another

BlogEngine Flaws(objectreference.net)

submitted by Vort3XVort3X(1335) 3 years, 6 months ago

Recently I’ve been having problems as the site has gotten more popular I’ve had comments and even posts disappearing randomly, sometimes re-appearing you might have experienced this yourself either on my site or in your own so after divulging into the code to see what was happening found something I thought was shocking. When you add a comment, or Rating, Approving and Remove Comments this is what BlogEngine DbBlogProvider actually does... read more...

add a comment |category: |Views: 243

tags: another

Web developers. You suck.(objectreference.net)

submitted by Vort3XVort3X(1335) 3 years, 6 months ago

Well, JavaScript developers, specifically. In order to aid in development of my own websites, I enabled JavaScript debugging in Internet Explorer a few weeks back. To my horror, I have quickly experienced what seems to be complete disregard for serving syntactically correct JavaScript on the open internet. No, I’m not just talking about a few niche websites, run by amateur programmers. I am talking about industry-leading nerd-friendly powerhouse websites that should know better. read more...

4 comments |category: |Views: 654

tags: another

Get Checked Repeater Items Extension Method(objectreference.net)

submitted by Vort3XVort3X(1335) 3 years, 7 months ago

Imagine you have a list of some items and checkboxes next to each item providing the ability for a user to make multiple choices and submit a result in one go. Weather you are implementing a news groups subscription, user survey or online products catalogue - the code behind is the same: we bind some object list to a data control like Repeater, add a checkbox to every item, set checkbox value to item ID. read more...

add a comment |category: |Views: 181

tags: another

enum to friendly string extension method(objectreference.net)

submitted by Vort3XVort3X(1335) 3 years, 8 months ago

We use enums quite extensively in our application as they are a great for representing integral values in a strongly typed way using symbolic names. The enum names are not very friendly to the user and I recently read a some good articles which tried to solve this problem. However, I think i've found a better solution to this problem using extension methods. read more...

add a comment |category: |Views: 382

tags: another

Object reference not set to an instance of an object(objectreference.net)

submitted by Vort3XVort3X(1335) 3 years, 8 months ago

This article is intended for amateur programmers, and/or people new to Object Oriented programming. “Object reference not set to an instance of an object” is probably the most common run-time exception message spat-out by the .Net framework, and most programmers will probably encounter this more often than any other framework exception type. read more...

add a comment |category: |Views: 96

tags: another

SCOPE_IDENTITY() return the id from the database on insert(objectreference.net)

submitted by Vort3XVort3X(1335) 3 years, 8 months ago

As a .NET programmer most of my time is spent coding in C# and I try to avoid writing SQL where possible. Recently I had to write an insert stored procedure and needed to return the ID of the row I was inserting. While writing my usual bad SQL I came across a fascinating function I’ve never used before, SCOPE_IDENTITY(). read more...

7 comments |category: |Views: 322

tags: another

the LinqToSQL is a lie(objectreference.net)

submitted by Vort3XVort3X(1335) 3 years, 9 months ago

LinqToSql is amazing! I've been working with it for the past week and loving every moment. However i've noticed somethig weird, it lies to me about the SQL it's generating. Here is my example... read more...

4 comments |category: |Views: 33

tags: another

Why can't you have handlers with multiple paths in web.config(objectreference.net)

submitted by Vort3XVort3X(1335) 3 years, 9 months ago

I have created IIS7 asset handler for my application which deals with images and stylesheets by serving them from a CMS database. For some reason the new IIS7 handlers section doesn't allow multiple paths for a handler, so you have to map each path like so... read more...

add a comment |category: |Views: 2

tags: another

A C# Operator I would like to see.(objectreference.net)

submitted by Vort3XVort3X(1335) 3 years, 9 months ago

You could argue there are too many operators in C# as it is; however, I feel having an acute knowledge of the available operators is like knowing CTRL + B will bold the selected text in most word processing software. To put it simply, it hurts no-one, whilst providing shortcuts to advanced users... read more...

add a comment |category: |Views: 14

tags: another

Implementing Generic Caching(objectreference.net)

submitted by Vort3XVort3X(1335) 3 years, 9 months ago

I develop for a large, high-availability website, with hundreds of thousands of daily users. As such, we need to cache a lot of data in our web-server memory (which is cheap) to save numerous hits to our main database cluster (which is very expensive). I would imagine the desire to improve performance by saving on database hits is common across many web applications – and caching frequently used data is often seen as one of the best ways to solve this problem. read more...

6 comments |category: |Views: 229

tags: another