background preloader

Codeproject.

Facebook Twitter

Simple NHibernate Architecture. Download source - 2,523.7 KB Introduction I started using NHibernate at the end of last year and I am having a wonderful experience with it.

Simple NHibernate Architecture

The simple fact that I don't have to maintain hundreds of procedures and data access abstraction classes to do basic CRUD operations is enough to justify the use of NHibernate (even though I used a custom code generation tool). Besides that, my code is amazingly clearer and simpler. I only need to worry about business and user interface logic now. I had zero experience with ORM frameworks, so on the first couple of weeks using NHibernate I had a hard time with some issues, like using it with ASP.NET disconnected objects and abstracting NHibernate sessions from the domain layer. Background I am assuming you already have some familiarity with NHibernate.

The Architecture The idea here is to keep my business objects unaware of an NHibernate session. Here's a class diagram just to give an idea: The Implementation Here's the code: Using AJAX AutoCompleteExtender for autosuggest. Download source - 2.64 KB Introduction In the present scenario, we need our text boxes to act more user friendly, so auto suggest is a feature that makes it more user friendly.

Using AJAX AutoCompleteExtender for autosuggest

Moreover the chance of making typo mistakes also reduces. This article will help you in adding a simple auto suggest feature using AJAX AutoCompleteExtender. Background A service is used to call the data from database. Using the Code Code is populating auto suggest for a company. The name of the service is “CompanyServiceForAutoSuggest” in which exists method GetCompanyList which includes two parameters: Rich Text Editor with ASP.NET. Download source - 634.8 KB Introduction As we know, ASP.NET lacks a control that we need most, RichText editor.

Rich Text Editor with ASP.NET

Programmatic login to CodeProject.com website. Download source code - 480 B Introduction In this article I will demonstrate to you how to login into a website programmatically using plain HTML Background While implementing a Single-Sign-On functionality, we need to login into other web applications without manually entering the credentials.

Programmatic login to CodeProject.com website

Getting started with Windows Phone and MVVM Light - Part 1 of 2. CodeProject There are a few other MVVM Frameworks available, but this by far is my favorite and in fact was also used by Amazon in their Kindle for Windows Phone application.

Getting started with Windows Phone and MVVM Light - Part 1 of 2

Start by going here and installing the latest version, this will install the templates within Visual Studio and what you'll need to complete the steps in this walk through as well as future applications I look forward to seeing. Creating the Application Open Visual Studio (I'm using 2010 for this), select New Project and in the Installed Templates you'll see MVVMLight(WP71). I left the name of the project MVVMLight1 just for example purposes. Go ahead and click OK and create the project. Connecting the View and the View-Model First let's look at the View.

You'll notice that instead of binding to an object directly, the DataContext is set to a StaticResource Property called Main within Locator. Next, if you move down to line 32, you'll see where the view is binding to properties in the View-Model. ViewModelLocator from: Looking at Windows Azure Mobile Services with Fiddler. CodeProject As usual throughout the day I have MetroTwit open and toast are constantly popping up here and there and I glance over to see what’s what.

Looking at Windows Azure Mobile Services with Fiddler

Then I see. from @WindowsAzure this: And all work stopped for me to check this out. Other than Windows Phone and Windows 8; I really love the new ASP.NET WebAPI and REST Services capabilities it has made so easy (watch for my next post on that), and seeing this I was thinking – awesome but only for Windows 8??? So…I immediately responded and got a response: Spending the last day or so checking into the walk through for Windows 8, check them out here. Getting Started In order to start using the preview of the Mobile Services in Azure, you need to have a Windows Azure account or you can sign up for a trial account. I have already signed up for the Mobile Services, so you will see a “try it now” button and go ahead click that to get started.

If you click on the URL, you’ll be presented with the following page… Pretty simple right? I like it! Getting started with Windows Phone and MVVM Light - Part 2 of 2. CodeProject In Part 1, we covered the following: Creating the application Connecting the View and the View-Model Adding an additional View or Page Part 2 we'll see how to add a button on the first page to navigate to the second page which will cover navigation and messaging to complete the application and although basic, will give a rather decent start to create and publish your first Rubber Ducky application.

Getting started with Windows Phone and MVVM Light - Part 2 of 2

YouTube Downloader using C# .NET. Attached new version Introduction This article shows how to download YouTube videos using C# code only.

YouTube Downloader using C# .NET

The code is very simple to understand and anyone can easily integrate it to in their solution or project. I didn't use any third party library to do this task. All you need is to take two .cs files and integrate them to your project. Using the code There are two main classes in this project: YouTubeVideoQuality Class This is the entity that describes the video. public class YouTubeVideoQuality { public string VideoTitle { get; set; } public string Extention { get; set; } public string DownloadUrl { get; set; } public string VideoUrl { get; set; } public Size Dimension { get; set; } public override string ToString() { return Extention + " File " + Dimension.Width + "x" + Dimension.Height; } public void SetQuality(string Extention, Size Dimension) { this.Extention = Extention; this.Dimension = Dimension; } } YouTubeDownloader Class.