Is this design ok?

In App_Code, i have the DBML folder and a AllClass folder. In AllClass folder i have my whateverclass.cs
In aspx.cs code behind, I instantiate the whateverclass.cs and call it's public method which calls the DBML or stored proc.

All my methods in whateverclass.cs are public. I have Update, Select and Insert methods, call stored proc. All the database

Is this a good way of coding this not truly an object oriented's like a one-on-one relationship with the database. Page calls database, pulls info, saves, updates, etc.

When I look at the code, i dont have reusable code. I have a class that logs user action. This should be ok, no? (I don't have
an architect on this app)
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Better way, you can add another project into your solution as 'Class library' for Data Access Layer (DAL) and write all static methods which will call DB and returns data from database.

Which will generate dll and then you can add reference of this dll into your main project.
So after this you can directly call,

Hope this clears you and made your project's architecture better. :-)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CamilliaAuthor Commented:
I'm using LINQ so I have a mean separate that DBML into another project..along with the whateverclass.cs I have?..make the DBML and all other xxx.cs classes into a separate DAL?
so that it will be proper three tier architecture.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.