Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

EPiServer 8 Best database access

Vote:
 

Hi everyone,

Just trying to build a new EPiServer project for a client. Previous versions (<7.5) allowed me to use>nhibernate in order to have a database access layer, however this does not seem to be compatible with version 8.

Does anyone know what is the best ORM to use and where I could find an example?

Thanks in advance.

With kind regards, SK.

#131385
Jul 22, 2015 14:52
Vote:
 

You should not access the database tables directly. Use the EPiServer API provided for all the tasks.

#131387
Jul 22, 2015 18:17
Vote:
 

Just like Thair say, you should never go directly to the database because it is first pretty complex and it is easy to miss something and also because EPiServer are cashing most of it content and by going directly to the database you will get different info on different servers.

There are a api for this that are very easy to use with interface against most types in the database.

Can you please give me one example where you like to go directly against the database so can I tell you how to solve it without doing like that.

Regarding the ORM discussion there are no best tool for everything and just like all other tools there are people saying this is the best and others saying that is the best.

For me I tend to like micro-ORM better and mostly use dapper. I use it against the EPiServer database when I for example like do read queries that are tend to get to complex with the api or does not have a good support in the api (for example to get a list of pageid's for a specific contentype (not doing that anymore))

#131390
Jul 22, 2015 20:53
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.