public static TecnoBlogDataContext GetContext() { TecnoBlogDataContext database = null; ConnectionStringSettings settings = ConfigurationManager.ConnectionStrings["TECNOBLOGConnectionString"]; SqlConnectionStringBuilder builder; if (null != settings) { string connection = settings.ConnectionString; builder = new SqlConnectionStringBuilder(connection); database = new TecnoBlogDataContext(builder.ConnectionString); } // IF ENDS return(database); } // GET CONTEXT ENDS
public TagQueryService() { this.database = DataContextFactory.GetContext(); }
public ImageService() { this.database = DataContextFactory.GetContext(); }
public ArticleTagService() { this.database = DataContextFactory.GetContext(); }
public ArticleCommentService() { this.database = DataContextFactory.GetContext(); } // CONSTRUCTOR ENDS ------------------------------------------------- //
public CommentService() { this.database = DataContextFactory.GetContext(); } // ------------------------------------------------------------------ //