Is there any way I can automatically generate BLL classes for a particular database table in c# .NET?

224 Views Asked by At

I have been writing BLLs for whatever new tables I create in the database and use them in the Data access layer. I was wondering if someone knows if there is an inbuilt option using .NET for generating BLL classes for a table in sql server database.

1

There are 1 best solutions below

0
D33 On

It depends on what you want on your objects or the behavior you want to give to them.

You already have Entity Framework as a possibility, that already does something very similar to what you describe.

There is also LLBL Gen Pro (not free, but amazing) that probably does everything you want.

You can also make your own code generator tool combining a template engine (like T4), with queries against your master database, perhaps using MicroORM to simplify DB access.