Does it make sense to have a model with only static methods?

Posted by Jamie Dixon on Stack Overflow See other posts from Stack Overflow or by Jamie Dixon
Published on 2010-05-28T12:02:19Z Indexed on 2010/05/28 12:12 UTC
Read the original article Hit count: 223

Filed under:
|

Hey everyone,

I have an ASP.NET MVC 2 project that I'm working on and I'm wondering where I should place some of my code.

I currently have a UsersModel which consists of a bunch of static methods that operate against my data context.

These methods include such things as: UserExistsInDatabase, UserIsRegisteredForActivity, GetUserIdFromFacebookId etc etc.

Should these methods be inside a UsersModel class or would they be more suited to a user helper class outside of the models context?

Cheers for any pointers.

© Stack Overflow or respective owner

Related posts about architecture

Related posts about asp.net-mvc-2