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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -