Showing posts with label NHibernate. Show all posts
Showing posts with label NHibernate. Show all posts

Sunday, December 22, 2013

NHibernate Second Level Caching Implementation

In this article, I explain how NHibernate 2nd level cache is implemented. As an Object Relational Mapper (ORM) when NHibernate is used often we see developers try to improve performance using NHibernate caching feature. In this article I focus on this area where 2nd level cache plays rule for better performance. Second level cache will help to overcome 1st level cache limitations. Anyone who are also interested to know how 2nd level caching can be implemented in any project, this article is for them too .


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials,NHibernate,NHibernate Cashing

Tuesday, December 3, 2013

NHibernate Setup for ASP.NET

NHibernate is quite a popular framework for abstracting and handling the persistence layer. Even today with Entity Framework, NHibernate is still the first choice for many developers due to its maturity and resourcefulness. This article aims to provide a basic ASP.NET application which would serve as the basis for anyone who whishes to start the development from scratch. Here is provided this basic app with a small entity being used and a detailed explanation on how NHibernate was setup in the application.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials, ASP.Net,NHibernate

Thursday, July 4, 2013

Working with Fluent NHibernate instead of xml

Fluent NHibernate allows you to write what is called a fluent interface instead of xml. A fluent interface is simply a fancy way of saying that the code is more human readable. And one of the best reasons to write this fluent interface is that it's managed code so you can evaluate it at compile time instead of runtime.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

</ span>C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials,NHibernate,Fluent NHibernate,ORM

Writing a WCF service with NHibernat

After getting comfortable with NHibernate in the web context, I wanted to find out how easy it would be to reuse some functionality via web services. I started with the usual WCF SOAP implementation and found that no session was available. It turns out the http module that creates the session and binds it to the aspnet session context was not being called when a client requested something from the service.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

</ span>C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials,WCF,NHibernate,WCF with NHibernate

Tuesday, July 2, 2013

NHibernate SessionPerRequest with WcfOperationSessionContext

NHibernate 3 comes with out of the box support for the scenario where we want to have a single Session for the lifetime of a WCF request. Using the Loquacious configuration we can easily set the WcfOperationSessionContext to be the default current session context.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

</ span>C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials,ORM,NHibernate,WCF,NHibernate SessionPerRequest,WcfOperationSessionContext

NHibernate Best Practices with ASP.NET, 1.2nd Ed.

Thankfully, technologies evolve over the years. Accordingly, Microsoft has introduced ASP.NET MVC as an alternative to classic ASP.NET. I have developed a new architecture which uses many of the design principles of this article for this newer platform called S#arp Architecture. Although this article is still the recommended background reading material for S#arp Architecture, you'll find the new architecture to be simpler and more maintainable while still leveraging the best of what NHibernate has to offer.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

</ span>C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials,ORM,NHibernate,NHibernate Best Practices

Wednesday, June 26, 2013

Quickstart tutorial for NHibernate.Search

To use NHibernate.Search one has to extract the instructions from a lot of different places, which sometimes have outdated information. This blog post is a summary of how I was able to successfully add an NHibernate.Search-powered search function to an existing NHibernate project.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

</ span>.NET, Lucene.NET, NHibernate, NHibernate Search

Nhibernate Caching With Redis

So I've recently been playing a bit with Redis, and also NHibernate so I thought, why not put them together. NHibernate supports a so-called 2nd level cache. For which you can use a number of different providers such as Memcached or Microsoft AppFabric / Velocity. But more recently thanks to some great people you can also use Redis as your 2nd level cache.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

</ span>C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials,ORM,NHibernate,Redis,NHibernate Cashing

Friday, June 14, 2013

Populating Entities From Stored Procedures With NHibernate

A short while ago we needed to fetch the data for some entities through a stored procedure for performance reasons. We already use NHibernate in the typical way to fetch and modify the data of this entity type, but we just wanted something so we could also use the resultset of the stored procedure to populate the entities. One of my team members spent some time figuring out how to get the data returned by the stored procedure into the entities without actually having to write the code ourselves. Turns out this was pretty easy to do. Let's go over the solution with a very simple example.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

</ span>Articles,Computer Tutorials,ORM,NHibernate,Fluent NHibernate,Stored Procedures With Fluent NHibernate

Stored Procedures With Fluent NHibernate

Ok the title of the post may be a little misleading because technically you cannot fluently map stored procedures, but you can still use the NHibernate configuration files to complement your fluent mappings with named query's (calls on stored procedures). A while ago I investigated how much work would be involved when making a migration from an ADO.NET to a NHibernate data access implementation whilst slowly swapping out stored procedures to use LINQ 2 NHibernate. Although this example only shows a few simple read operation's even more complex operations are relatively straight forwards to migrate.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

</ span>Articles,Computer Tutorials,ORM,NHibernate,Fluent NHibernate,Stored Procedures With Fluent NHibernate

Wednesday, June 12, 2013

NHibernate and MySQL - A simple example

As I usually like to try things out right away, I did the same when starting to learn about NHibernate, so I fired up my Visual Studio 2008 and created a new web application to be able to explore this new and awesome technique. I had read (as always not so thorough perhaps) the documentation and had also searched around for some simple examples to get me started, and as I am a fan of MySQL, I wanted to use it in my first test application. Unfortunately, I stumbled across some problems right away since all the examples I had seen and all the documentation samples didn't really state which version of NHibernate was used and not which version of MySQL had been tried on, so it took me a while to get everything up and running. Due to these problems, I decided to write a short text about how you can use NHibernate and MySQL, and specifically for NHibernate 2.0.0.1001, MySQL 5.0.45, and by using the MySql ADO.Net driver 5.1.5.0. I don't intend this text to be all that detailed, but the intention is to give an example of how it can be done in the simplest way.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

</ span>C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials, NHibernate, MySQL

Wednesday, May 29, 2013

NHibernate Made Simple

This article grew out of my frustration trying to get started with NHibernate. It seemed that all the introductory material I found was either very vague or so detailed that I got overwhelmed before getting to first base. What I was looking for was a simple, straightforward tutorial that would get me up to speed on the fundamentals of NHibernate as quickly as possible. I never found it. Hopefully, this article will serve those needs for other people. This article is going to be rather lengthy, but I encourage you to work your way through it. NHibernate is a complex piece of software, with a steep learning curve. This article will flatten the curve from a matter of days or weeks to a matter of a few hours.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

</ span>C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials,DBA,ORM,NHibernate

Friday, May 24, 2013

NHibernate NFluent and custom HiLo generator

Azure SQL is not completely compatible with SQL Server. All the limitations are described over here. One of the limitations is that every table in Azure SQL needs CLUSTERED INDEX. If you are using NHibernate & NFluent, than any identity mapping will create clustered index if it can. If you want to use HiLo generator to get the ID's, than you need to configure special table for the generator. To use the generator you can let NHibernate to create the table.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

</ span>C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials, NHibernate, NFluent, HiLo generator