c# - OrmLite pattern for static methods in business logic -
for web-based (asp.net) environment, best way design base service class using ormlite (for factory , connection), such business logic classes (derived base class) can support static methods database operations?
sample business logic class:
public class jobs : service { public static job get(int jobid) { return db.id<job>(jobid); } }
i want reduce code repetition (for ormlite factory , connection handling) , support static methods. i'm not sure if making idbconnectionfactory
, idbconnection
objects static in base service
class sufficient. i've looked @ similar question (servicestack + ormlite + repository pattern) addresses issue non-static methods.
Comments
Post a Comment