开发者

ignore Castle ActiveRecord connection failure

I am using castle activerecord to persist my domain objects to a sql server database. If for whatever reason the database connection fails i need to be able to ignore it and carry开发者_JS百科 on with the opperation of the program.


You can't ignore connection errors. It's up to you to decide what to do in case of a connection failure. For example, if you query for some User entities and there's a connection error, what should NHibernate/ActiveRecord return? It can't possibly make up results.

If you're working with an occasionally connected scenario, see this question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜