1

Everyone touts the wonders of llblgen, but I've found very little in the way of examples of its usage in c#. The documentation for llblgen explains how much you can do, but provides virtually no examples, preferring instead to provide complicated text explanations when actual code would say it much more clearly to coders.

I am new to llblgen usage, and trying to do the simple task of querying two databases on two different servers for matches of a user's login credentials. How in the heck do I tell llblgen to either a) try both catalogs on one GetMulti() call, or b) try one, then I manually switch the catalog name, and try the other?

Please help!

neil1967
  • 257
  • 3
  • 16
  • If you are just starting to use LLBLGen, I would advise against it. Generated code apporaches are falling out of favour now that c# has generic types, dynamic objects, LINQ, etc. Approaches like Dapper end up being faster, quicker to compile, less code to work with, and extremely convenient. You lose the ability to easily traverse relationships without coding it yourself, but that is usually a good thing, as you avoid the N+1 pitfalls. – D'Arcy Rittich Jul 18 '12 at 20:15
  • @RedFilter IMHO I think it's a bit too biased to put it like this, since you don't know enough about the users requirements. LLBLGen Pro (especially the runtime + adapter paradigm) has good solutions (if not the best) for N+1 problems, in addition to high performance, low memory usage, a great LINQ parser, and support for a large variety of databases, so you're too quick with saying "it's is stupid because it's not hip", not too mention the fact that you're not even remotely helping the user to answer his question. – Wiebe Tijsma Jul 19 '12 at 13:50
  • @user1426464, if your requirements are querying multiple databases with the same schema, I'd advise using the "Adapter" templates, they're more modern and you can just provide the connection string + database per adapter instance. – Wiebe Tijsma Jul 19 '12 at 13:53
  • @Zidad I freely embrace my bias, as it comes from experience. My advice was offered as a comment, and thus was not intended to be an answer to the specific question. – D'Arcy Rittich Jul 19 '12 at 14:53
  • @RedFilter Sure you can have a personal preference, I'm just saying you are dismissing something that the user might not be able to dismiss. Additionally I think your arguments are not valid, as the concepts you name (generics, LINQ, anonymous/dynamic types, N+1) are either supported or irrelevant, especially without backing them up with proper argumentation or examples. – Wiebe Tijsma Jul 19 '12 at 15:04
  • @RedFilter don't get me wrong there's just not enough space or the the correct place to start a discussion like this. Maybe it's easier refer to a thread like this http://stackoverflow.com/questions/1114215/nhibernate-versus-llblgen-pro – Wiebe Tijsma Jul 19 '12 at 15:15
  • What version of LLBLGen? And are you using Self-Servicing or Adapter? Adapter you can specify the connection string when you instantiate the adapter. If self-servicing, in early versions there is a DbUtils.ActualConnectionString you can set--in later versions this moved to: CommonDaoBase.ActualConnectionString. – scotru Apr 14 '16 at 05:09

0 Answers0