Exemplo n.º 1
0
        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
Exemplo n.º 2
0
 public TagQueryService()
 {
     this.database = DataContextFactory.GetContext();
 }
Exemplo n.º 3
0
 public ImageService()
 {
     this.database = DataContextFactory.GetContext();
 }
Exemplo n.º 4
0
 public ArticleTagService()
 {
     this.database = DataContextFactory.GetContext();
 }
Exemplo n.º 5
0
 public ArticleCommentService()
 {
     this.database = DataContextFactory.GetContext();
 } // CONSTRUCTOR ENDS ------------------------------------------------- //
Exemplo n.º 6
0
 public CommentService()
 {
     this.database = DataContextFactory.GetContext();
 } // ------------------------------------------------------------------ //