Add ASP.NET MVC to LightSwitch 2013

I’ve worked with Microsoft LightSwitch since its early beta days.  Its exciting to see all the new changes coming with the new Visual Studio LightSwitch 2013.  One of the interesting areas is being able to use LightSwitch for your backend and mobile development and other technologies in the Microsoft stack for the desktop.

In this first post I’ll show you how we have been successful in adding the MVC framework to a LightSwitch project.  You’ll be able use the RAD tools of LightSwitch to develop your database, business logic and mobile screens.  And then use the full power of ASP.NET MVC to do your full web based desktop application, including the new rage of SPA’s.

We’ve been successful in using this process for a large application using LightSwitch, ASP.NET MVC/API, Bootstrap and Kendo UI.  An amazing combination and one that I’ll continue to blog about in upcoming posts.

Enough of the chatter… Lets get to it…

Visual Studio 2013 Preview and about 10 minutes is required.

  1. In Visual Studio 2013 (VS), select File, New Project…
  2. Under installed templates, select LightSwitch
  3. Select one of the LightSwitch HTML Application templates (C# or VB)
  4. Name your project and solution, press Ok
  5. VS will create your project and land you on the “Start with data” page
  6. Click on “Create new table”
  7. Name the table “AppUser” (for example sake)
  8. Add a couple of properties, Property1, Name, string
  9. Property2, Email, email address
  10. At the bottom of the screen, click on HTMLClient
  11. Then at the top of the screen, click on Add: Screen
  12. Select the “Browse Data Screen”, Screen Data as AppUser, click Ok
  13. Leave the generated screen with defaults for this example
  14. Save all files, build the solution
  15. You should get a successful build

Now we move over to the solution explorer side.  The following will be done in the “server” project:

  1. Right click on the server project, Select Add… Scaffold…
  2. In the popup dialog, select “MVC 5 Dependencies”, click Add
  3. In the second popup, select “Full dependencies”, click Add
  4. VS will add and configure “most” of the required items for the MVC framework
  5. Right click on References, select Add Reference…
  6. In the popup dialog, select System.Web, click Ok
  7. Right click on the server project, select Add… New Folder… name it “Controllers”
  8. Right click on the Controllers folder,  select Add… Scaffold…
  9. Select “MVC 5 Controller – Empty”, click Add
  10. Name the controller “HomeController”, click Add
  11. Right click on the Views folder, select Add… New Folder… name it “Home”
  12. Right click on the Home folder under Views, select Add… Scaffold…
  13. Select the “MVC 5 View – Empty without model”, click Add
  14. Give the view the name of “Index”, leave the rest as defaults, click Add
  15. In the resulting Index.cshtml (vbhtml) file, edit to show the traditional “Hello World!”
  16. Save all files
  17. Build the solution, should be successful
  18. Run the app (F5)…

The HTMLClient will run first, this can be changed as needed.  You’ll get a LightSwitch HTMLClient browse screen that doesn’t show any records, since we don’t have any data.  This validates that the LightSwitch side of the app is functioning correctly.

Copy the URL, open up a new browser or tab, paste in the URL.  Replace the HTMLClient part of the URL with Home.  You should get the Hello World page being server up by the MVC framework.

So in less than 10 minutes you’ve successfully turned a LightSwitch 2013 project into a platform that has some amazing possibilities.  Hopefully the development community will start to take this tool seriously!

Stay tuned for upcoming posts of our integration with Web API, Bootstrap and Kendo UI.


Tagged , ,

20 thoughts on “Add ASP.NET MVC to LightSwitch 2013

  1. foxgzsvvq says:

    Круто, давно искал
    Казино на advance-rp как играть

  2. Rogeraxome says:

    How to find a woman for casual sex:

    Popular tags: dating ideas long distance, o que Г© matchmaking league of legends, cute dating site headlines, what does the word dating mean to you, dating sites that use myers-briggs, dating older more experienced guy, creating a successful dating website, free dating site evow, average dating before marriage, global dating sites free, best online dating profiles uk, hook up above ground pool pump, how far back can carbon dating accurately be used, dating types of guys, speed dating chateauroux, asian dating websites, genital herpes and dating, is kim kardashian dating harry styles, dating infp male, who is max from dancing with the stars dating 2012, dating app on blackberry, why does nobody respond on dating sites, dating sites for 70+, dating website depression, how to find hidden profiles on dating sites, new dating app sf, spiritual speed dating northcote, easy dating profile, meryl and charlie dating 2014, brooklyn dating site, jordan dating culture, indian american dating sites, timeout dating uk, not interested in dating anyone else, woman dating a man with hiv, speed dating grande prairie, dating for over 50s free, korean dating style, fitness dating online, dating sites to find police officers, viking 2 dating, what to consider before dating a guy, best straight dating app for iphone, dating short man, 100 free dating site in africa, online dating lusaka zambia, dating younger korean man, how often should you talk to the person you’re dating, dating ex boyfriends friend, classical fm dating, hayward pump hook up, dating sites in hamburg, dating a black american girl, dating fair jaarbeurs utrecht, online dating sugar daddy, josh bowman emily vancamp dating 2014, how to win a girl who is dating someone else, 100 free dating site, dating site exposed, gay dating in san diego, t-54 first prototype matchmaking, catch dating site, writing an internet dating profile, free christian dating no credit card, foreign dating sites, dating younger gay guys, new dating programme itv, dating club kenya, research on carbon dating, dating profiles examples for men, dating contact, elove matchmaking office, dating after breast cancer, senior dating apps, radiometric dating and carbon dating, how to send first message on dating site, real hookup sites that work, online dating sites with free chat, what to know before dating an indian guy, online dating pictures examples, marathi dating pune, korea dating blog, hook up with cougars, casual dating chandigarh, is a 20 year old dating a 17 year old bad, dating site adsense, mpls dating sites, best dating site filipino, online dating efl lesson, 17 yr old dating sites, ontario dating websites, dating your girlfriends best friend, lesbian dating sites northern ireland, dating free games, acne dating website, meeting someone from an online dating site, free online dating sites for women, italian american dating sites, mature dating only price, fat women dating site, boyne tannum hookup 2014 prizes, love buddy hookup, dating third date, speed dating jeune toulouse, white rabbit speed dating, dating website brighton, dating rules from my future self the jimmy song, best aussie dating sites, dating signs she is not interested, speed dating l’isle adam, can you hook up a us cellular phone to straight talk, dating pro athletes, dating in your 30s, if you’re the one dating show, speed dating ni, online dating woes, date hookup meet me, phoenix dating ideas, dad’s rules for dating, what do you call the guy you re dating, speed dating fort worth texas, i dating married man, asian free dating site online .com, group dating meaning, best hookup sites ontario, dating should you call him, online dating facts 2012, i got the hook up hook it up, dating sites for married persons, what to know about dating a hispanic man, how dating works in germany, pua dating coworker, dating site in south america, itv new dating show, cost of dating sites canada, how to stop dating on sims freeplay, dating saudi man, chat dating flirt, vinny jersey shore dating 2014, free dating sites for single ladies, hallmark dating, dating ann arbor mi, dating websites for runners, donovan star dating 18 year old, dating guy with social anxiety, dating guy moving too fast, eligon dating, greek american online dating, is dating sites successful, learning disability dating site, canon or nikon speed dating, online dating in scotland, cloudromance dating site, speed dating daytona beach fl, mobile dating apps for iphone, full hookup rv sites az, free trial phone dating lines, psychology today dating advice, casual dating sites sydney, dating partner med niveau, friends dating 4 u, casual hook up hong kong, three dating show, no we re not dating but he still mine, best tips for dating, dating satire, fda dating, new york times internet dating, dating a nice girl, are britt and brady dating, what to do when online dating, fiji dating, ang dating daan debate february 7 2014, pennsylvania dating sites, 100 free online indian dating sites, topics to discuss while dating, high school dating timeline, writing a dating email, herpes dating free sites, best dating sites 20 somethings, dating after the honeymoon phase, college students hook up, sioux falls sd speed dating, over 50 dating login, dating brighton, best hookup sites 2014 uk, 21 dating a 34 year old, online dating hookup stories, local speed dating events brought to you by plentyoffish/fastlife, lamar odom dating 2016, interracial dating seattle, dating relating, online dating in russia, scotland dating sites, how to write an online dating message examples, dreams about dating someone you don’t like, no payment dating sites, free horoscope matchmaking in hindi, dating site pta, clown dating sight, blind dating app android, dating sites in san francisco, benefits of dating a southern man, footballers dating website, free motorcycle dating sites, my ex husband is dating again, gooseneck hook up helper, dating online now, what is the name of the cellc dating service, dating sites you don’t have to register for, dating in new hampshire, times dating encounters, descriptions for dating sites examples, hook up turtle beach x12, dating online zoosk, banbury dating site, efl dating activities, best online dating sites to find a relationship, mount etna radiometric dating basalt, relative dating activity answer key, agencies and dating sites dubai, online dating usernames for females, free dating sites no signing up, online dating blogspot, vergelijken dating sites, how has online dating changed society, probleme ping matchmaking cs go, prime minister is dating ep 14, draco and hermione are secretly dating fanfiction, 21 girl dating 16 guy, dating for metalheads, senior dating phoenix az, speed dating events houston tx, awkward russian dating site pictures, ginger dating site canada, free christian marriage dating sites, online kundli match making hindi free, who is ashley tisdale dating, frustrated with dating life, guy dating girl 3 years older, dating a hiv positive girl, dating london buildings, speed dating kenya, sand mountain matchmaking, dating success rate, speed dating mГјnster 2014, waiting until marriage dating site, tijuana dating service, hiv dating groups, uniform dating voucher code, tips dating cop, personal matchmaking services melbourne, dating simulators for android

  3. CharlesUnuth says:

    hOur company offers herb-based supplements. Look at our health contributing website in case you want to feel better. Our company provides supreme quality pills. Take a look at our health contributing portal in case you want to feel better. Our company provides a wide variety of healthcare products. Visit our health contributing portal in case you want to improve your health. Our company provides a wide variety of non prescription products. Take a look at our health website in case you want to strengthen your health with a help health products. Our company provides a wide variety of non prescription products. Visit our health site in case you want to strengthen your health. Our company provides a wide variety of non prescription products. Look at our health portal in case you want to strengthen your health with a help of generic supplements.
    Our company offers a wide variety of non prescription products. Look at our health portal in case you want to to feel healthier with a help of general health products. Our company offers a wide variety of health products. Take a look at our health contributing portal in case you want to look better. Our company offers safe pharmacy. Take a look at our health contributing portal in case you want to strengthen your health. Our company offers safe general health products. Look at our health contributing site in case you want to strengthen your health. Our company provides a wide variety of non prescription products. Look at our health portal in case you want to to feel healthier with a help general health products.

  4. site says:

    It’s an amazing piece of writing for all the internet people; they will take benefit from it I
    am sure.

  5. phoebezi11 says:

    Right-minded started untrodden conjure up:

  6. Keithusamy says:

    logiciel espion iphone – VisionBot Pick and Place More info…

  7. CedricknoX says:

    Эссе по обществу 1 – Click here!..

  8. Cartoon has always fascinated me, this is a good source packed with some quality reports about them. Welldone.

  9. Thankyou Lindsay. Although it looks like along way I remember the night,. Hoping you and your Mother nicely.

  10. Charlestib says:

    viagra info , , viagra improves erectile function by is it legal to buy viagra online in usa viagra canada prescription

  11. Janice says:

    great issues altogether, you simply received a new
    reader. What would you recommend about your put up that you made some days in the past?
    Any sure?

  12. I think the admin of this website is really working hard in favor of his web page,
    since here every stuff is quality based stuff.

  13. You need to be a part of a contest for one of the greatest blogs online.

    I’m going to highly recommend this blog!

  14. Attractive section of content. I just stumbled upon your site and in accession capital to assert that I
    get actually enjoyed account your blog posts. Anyway I’ll be subscribing to your
    feeds and even I achievement you access consistently quickly.

  15. Interesting blog! Is your theme custom made or
    did you download it from somewhere? A design like yours with a few simple tweeks would
    really make my blog jump out. Please let me know where you got your theme.
    Thank you

  16. christina says:

    Thanks for sharing this blog,informative and useful for me..

  17. paul says:

    Great !
    Did you think already about the opposite way? An MVC app which hosts multiple html5 apps.

Leave a Reply to christina Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: