0 Comments

Current Multi-blog enabling LINQ to SQL BlogEngine.NET Provider. (Updated 3/12/10)

I have been asked for this code so that we can share the multi-blog solution that has been working for me for almost a year now.  This is the time to check it out and help make it work for yourself and others.  I’m going to continue to “dog food” this here.  Current version of BlogEngine.NET supported by this provider, as of this post, is 1.6.0.3.  Although I need to update my own site(s) from 1.6.0.1.

 

How will I update?

Mine is easy.  Drop in the new DLLs.

If I do a code “diff” and find the Web code to have changed recently (which I’m sure it did) I will copy those specific files to the Web folder.

 

How do you update from a cleanBlogEngine.NET 1.6.0.3code base?
  1. You should download the latest BE.NET code from codeplex and create a folder for the solution. 
  2. Extract the code from the zip into your solution folder. (…and follow the directions for setting up a stand-alone SQL Server Blog)
  3. Copy and unzip the BlogEngine.Linq2SQL.3-12-10.zip folder into the solution folder with the Core and Web projects.
  4. Add an existing Project to the solution, select the BlogEngine.Linq2Sql project.
  5. Verify the References (to project “BlogEngine.Core”)
  6. Add a reference to “BlogEngine.Linq2SQL” from the “BlogEngine.NET” Web site.
  7. Change Target Framework on BlogEngine.NET Web site to “.NET Framework 3.5
  8. Execute the SQL build script “Linq2SqlUpdate.sql” to add schema to support Multi-Blogs.
    • Make sure to run against the Database you created in Step 2.
  9. Assuming you are using the correct connection string, modify the Web.Config
    • blogProvider, membership, roleManager
    • See: Web.Config.xml

For those who like pictures to verify what you’re doing, here are a couple.  I’d rather have an installer but I’m not quite there yet.

Step 3:

Step3

Step 4:

Step4a Step4b Step4c

Step 5:

Step5

Step 6:

Step6 Step6b

Step 7:

Step7

Step 9:

1: <BlogEngine>
2: <blogProvider defaultProvider="Linq2SqlBlogProvider">
3: <providers>
4: <add name="Linq2SqlBlogProvider" type="BlogEngine.Linq2SQL.Linq2SqlBlogProvider, BlogEngine.Linq2SQL" connectionStringName="BlogEngine"/>
5: <add name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider, BlogEngine.Core"/>
6: <add name="DbBlogProvider" type="BlogEngine.Core.Providers.DbBlogProvider, BlogEngine.Core" connectionStringName="BlogEngine"/>
7: </providers>
8: </blogProvider>
9: </BlogEngine>
10:
11:
12: <membership defaultProvider="LinqMembershipProvider">
13: <providers>
14: <clear/>
15: <add name="LinqMembershipProvider" type="BlogEngine.Linq2SQL.LinqMembershipProvider, BlogEngine.Linq2SQL" passwordFormat="Hashed" connectionStringName="BlogEngine"/>
16: <add name="XmlMembershipProvider" type="BlogEngine.Core.Providers.XmlMembershipProvider, BlogEngine.Core" description="XML membership provider" passwordFormat="Hashed"/>
17: <add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="BlogEngine" applicationName="BlogEngine"/>
18: <add name="DbMembershipProvider" type="BlogEngine.Core.Providers.DbMembershipProvider, BlogEngine.Core" passwordFormat="Hashed" connectionStringName="BlogEngine"/>
19: </providers>
20: </membership>
21: <roleManager defaultProvider="LinqRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".BLOGENGINEROLES">
22: <providers>
23: <clear/>
24: <add name="LinqRoleProvider" type="BlogEngine.Linq2SQL.LinqRoleProvider, BlogEngine.Linq2SQL" connectionStringName="BlogEngine"/>
25: <add name="XmlRoleProvider" type="BlogEngine.Core.Providers.XmlRoleProvider, BlogEngine.Core" description="XML role provider"/>
26: <add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="BlogEngine" applicationName="BlogEngine"/>
27: <add name="DbRoleProvider" type="BlogEngine.Core.Providers.DbRoleProvider, BlogEngine.Core" connectionStringName="BlogEngine"/>
28: </providers>
29: </roleManager>

0 Comments

From: TVUG President, Griff Townsend:

Sorry for the delay in getting this out: things always seem to get hectic around the time to put announcements out, and this month was no exception. With that said, I've spoken with this month's presenter (in the mirror), and he is ready to go.
Using the Entity Framework in .Net 3.5 SP1


Speaker:Griffith Townsend, MCP.NET, MCSE
When: Tuesday September 8th, 2008 - 6:30-9PM
Where:VersaTrans Solutions, Latham, NY


When developing multi-tiered applications, it’s not uncommon that to encounter code and architectural “noise” where a developer is forced to shift languages between the business logic layer and the data layer. The preference of many developers is the use of tools (typically Object Relational Mapping solutions) to abstract the database-specific aspects of the data layer into objects usable by the upper layers by object-oriented programming languages.

Microsoft’s long awaited Entity Framework (EF) is one approach to raise the level of abstraction in complex applications, separating the logical object schema from the underlying data store. EF allows developers a lot of flexibility in creating and mapping database entities, relationships, functions, and procedures into either direct class translations or custom business entities.

In this presentation, Griff Townsend introduces us to the Entity Framework as of its initial release in SP1, providing an architectural overview of EF, while also extending it into a working Data Layer. The presentation will also cover:

  • Building your first EF model
  • Using Stored Procedures and customizing business objects in the EF model
  • Extending the Framework to support more robust data access
  • LINQ to EF vs. LINQ to SQL
  • Sharing Entities between layers


Bio: Griff Townsend is a Senior Software Engineer for 6N Systems and the President of the Tech Valley .Net Users Group. In addition to over 14 years of web- and windows- development experience in Central and Upstate New York, he has also taught Software Development for Syracuse University and ITT Tech. He is a Microsoft Certified Developer in .Net, as well as a Microsoft Certified Systems Engineer. He's starting to blog these days, too.

0 Comments
I was looking for a List of US Cities and States.  This is what I created in the process.  I'm still looking for a List of US Cities grouped by State so I can drop it in a SQL Server Database.  Then I can extract export it to XML and post it here.

Here are XML Element and XML Attribute representations of US States.

XML-US-States-Database.zip (1.37 kb)