posts - 81, comments - 257, trackbacks - 0

Migrating an MVC site to Orchard Project 2 (Part 2)


I've started migrating my application into the module. The major consideration has been handling the use of LINQ to SQL and the Entity Framework together.

  • My MVC application uses LINQ to SQL. I had to regenerate the data context with sqlmetal to resolve some odd errors when working with NHibernate. In particular my data context was generated by an old version of sqlmetal – it just needed an updated generation. I found it useful to create a BAT file to regenerate the context for me.

    call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\VsDevCmd.bat"

    sqlmetal /server:MACHINENAME /database:DBNAME /code:DataContext.cs /language:csharp /views /functions /sprocs /namespace:Models /context:DataBase

  • I ran into an issue with my 'Distributed Transaction Coordinator' service not running. This threw a run time exception during my module development. It appears to be needed when my LINQ to SQL context and Orchard's NHibernate context use transactions at the same time.
    • The solution was using a new TransactionScope around the LINQ to SQL calls with TransactionScopeOption.Surpress.
  • During the development of a module I needed to uninstall the module from the database. There were two options, I used the later.
  • I found this tutorial on developing a content part useful. It is detailed and provides another perspective. Yet another useful tutorial in creating a content part is found here. Finally, there is the very basic tutorial on creating a map content part which is perhaps the most useful for its minimalism.
  • Turning a content part into a widget is straightforward through the Migration class.

The next step is for me to migrate my Controllers and Views into the module. Part of this is integrating my authentication within Orchard.


Print | posted on Sunday, December 2, 2012 2:55 PM | Filed Under [ Web Programming ]

Feedback

Gravatar

# re: Migrating an MVC site to Orchard Project 2 (Part 2)

I would like to know how you backed up the database using migration, seems simpler in the long run.
1/16/2013 2:29 PM | Neurological Examination Pins
Gravatar

# re: Migrating an MVC site to Orchard Project 2 (Part 2)

Pretty nice post. I just stumbled upon your blog and wanted to say that I have really enjoyed browsing your blog posts. In any case I’ll be subscribing to your rss feed and I hope you write again very soon! really good work done thanks for such nice post.

Locksmith Newark
2/11/2013 1:13 AM | Newport News Locksmiths
Gravatar

# re: Migrating an MVC site to Orchard Project 2 (Part 2)

Its a great tutorial posted by you with the coding section. I like that content.
2/22/2013 2:17 AM | Floor Sanding and Polishing
Gravatar

# re: Migrating an MVC site to Orchard Project 2 (Part 2)

nice blog.
3/27/2013 7:54 AM | santa
Gravatar

# re: Migrating an MVC site to Orchard Project 2 (Part 2)

I like the website. Great website..
4/15/2013 8:24 AM | Topless Waiters
Gravatar

# re: Migrating an MVC site to Orchard Project 2 (Part 2)

I'm consulting for this Lycium Barbarum for weight loss management; when I bumped into this particular blog posted on your web-sites. I did like it and also I'm looking forward in dropping in in the future.
10/8/2013 5:06 AM | Visit this site
Gravatar

# re: Migrating an MVC site to Orchard Project 2 (Part 2)

I'm also having the same issue, thanks for bringing this up. Visit dissertationtop.com for the best writers.
11/11/2013 11:40 PM | Mickey
Gravatar

# re: Migrating an MVC site to Orchard Project 2 (Part 2)

Being alone here in the hotel room gives me goose bumps; making use of my android phone I Visit this site so as to find good stuffs. And yes, I found Migrating an MVC site to Orchard Project 2 (Part 2) worthwhile of my time seeing.
12/14/2013 2:39 AM | German Danley
Gravatar

# re: Migrating an MVC site to Orchard Project 2 (Part 2)

I am not normally empowered by informational content, yet your take on Migrating an MVC site to Orchard Project 2 (Part 2) seriously made me consider your viewpoints. You have surely offered beneficial and strong thoughts that are reasonable and fascinating. I personally care to blog about http://silverlakestudiola.com. Therefore I am aware of the hard work it requires to create an informative write-up similar to this. Thank you so much for sharing with us your effective work.

12/19/2013 3:01 AM | Cesar Azevedo
Gravatar

# re: Migrating an MVC site to Orchard Project 2 (Part 2)

Hello guys! I was looking for comment investir en bourse
article online but instead, I saw this notably more insightful Migrating an MVC; I guess I'll drop in here once again in the near future.
1/16/2014 10:19 PM | Ralph Kappel
Gravatar

# re: Migrating an MVC site to Orchard Project 2 (Part 2)

Howdy fellas! Whilst taking a look at your blog, I ran into this word travail a domicile; to my eagerness I scanned it up on the world wide web.
1/23/2014 8:49 PM | travail a domicile
Gravatar

# re: Migrating an MVC site to Orchard Project 2 (Part 2)

I've been very much drained searching for Debt Settlement articles; and so I searched blogs just to boost my cognitive powers, and your blog certainly offered me more than enough, thanks.
1/31/2014 9:38 PM | Richard King
Gravatar

# re: Migrating an MVC site to Orchard Project 2 (Part 2)

Running Tips<br>


2/5/2017 7:52 AM | A

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 1 and 5 and type the answer here:

Powered by:
Powered By Subtext Powered By ASP.NET