Entity framework code first not creating database in vs2010 - sql-server

I’m new to vs2010 and the entity framework (and ASP.NET MVC as well....I’m from a winforms vs2005 background) as well as the azure platform and am starting a project using these technologies soon.
I’ve installed vs2010 and the windows azure sdk kit for vs2010 and am running through this tutorial, Deploying an ASP.NET Web Application to a Windows Azure Cloud Service and SQL Database.
http://www.windowsazure.com/en-us/develop/net/tutorials/cloud-service-with-sql-database/
I’ve got as far as the ‘Add SQL support’ section, followed the instructions and when I compile and run no database is being created.
And I’m using sql server 2008 r2.
Any ideas why this is the case? Nothing at all is being shown in the sql server log. My connection details look fine, am I missing some kind of add on or some permission settings need changing?
Cheers,

I've sorted this myself. If you wish to know the answers I've posted them in the comments on the tutorial page, just follow the link (names Mathew in the comments section).
http://www.windowsazure.com/en-us/develop/net/tutorials/cloud-service-with-sql-database/

Related

Visual Studio ADO.NET missing

I would like to connect my Visual Studio 2013 project (Windows 8.1 app, x86) to an external SQL Server database to get, visualize and set some values. Therefore I found out that I need to use ADO.NET.
Unfortunately the related template in Visual Studio seems to be missing. So I googled that problem and found some solution possibilities (reset visual studio settings and user data, reinstall Visual Studio, run newest version of EFTools,...), but nothing could help me. I tried for hours now...
So what could be the problem here? I have installed VS13 Ultimate from MSDNAA. Why are the templates missing? Is there another easy way to access the external SQL Server database?
Thank you very much!
edit:
It seems to be that a so named "Universal App" doesn't support ADO.NET (for other projects I easily can add an "ADO.Net Entity Data Model". What else can I do to access a SQL Server database? What is the right way in such case?
Most convenient way to implement database access would be with EntityFramework as you figured out already. What marc_s meant is that for your app, you cannot implement it directly in this type of the project.
Implement your Data Access Layer in a separate project of Class Library and expose the data using either WCF or WEB API projects (your services layer) that will make use of he DAL. For both Entity Framework and for services there are numerous tutorials all over the internet. When your services are working (and tested!) you just add a reference to your universal app and call the services from there. That way the database access is isolated from the application and all the vulnarable and time consuming logic stays on the server side.
P.S. Services and DAL does not need to be kept in the same machine as the database, however it's recommended to keep it in the same network.

How to deploy entity framework code first for a standalone app

I have just finished an standalone desktop application in C# and .Net. For the app, I need to access several existing SQL Server tables for various data. I accomplished it with Entity Framework 6 code first. My question is how I should update the connection string in app.config during a customer installation to reflect customer's SQL Server configurations. What steps are generally involved? What options are available to me? I'll use Inno Setup for the app installation.
Thank you.

Azure Angularjs Website + Nancyfx + SQL Databases deployment strategies

I have deployed an Website built with angularjs and a Web Service Running Nancyfx framework rather than the "suggested" Web Api. I also use 2 SQL Databases.
I did this from Visual Studio where I have my project running. However the app (still in development) was developed locally on my mac and then just copied in visual studio.
Since I would be working with a friend of mine on it (who also uses mac) and we already have it on bitbucket with Git (my local version) I was wondering if it was possible to 'Set up deployment from source control' but only for the "website" part, meaning the angularjs. The web service needs to obviously be deployed from Visual Studio (I'm the only one working on that part).
Is there any way to achieve this? If I set up deployment from source control and then publish to the website from visual studio, would this override the existing version and current deployment last updated from Git? will it get denied publishing since it's set up from Git?
I am not sure how to better approach this.
The dirty way would be to set git for me and my friend on my local "app" folder of my Visual Studio solution so that I get his changes and then it's my job to publish it to azure via Visual Studio.
Turned out that what i needed is exactly this: Publish WebAPI and MVC projects to same Azure Web Site?
I therefore split my webservice (API) project so it's by itself and published that to mywebsite/api while my app resides on mywebsite/app so that I can publish my webservice changes from visual studio without problems, and also publish the changes to my angularjs app via git.
I haven't encountered any downside atm of doing this but it seems this is the best approach.

How to publish Windows Form Application with Entity Framework

Hi All I have created a windows form application using VS 2010, Entity Framework and MYSQL database. Database is hosted at some hosting company and is accessible from every where. Now when I create an step up of my application and install on other systems it stops working. No error message nothing. Please help if anyone have build windows form application with entity framework and successfully installed on other machines.
Tried so much on google but no luck.
Hi All I have found solution. The problem is with use of MYSQL database in my application. I have used MYSQL connector and it is causing the problem. I simply install MYSQL connector to remote machines and it solves the problem.

Lightswitch prerequisites on ASP.NET webserver

I am trying to deploy a LightSwitch application to a hosted ASP.NET webserver in my company. The application access data stored on a SQL Server. My webserver admin is asking me if there are any special prerequisites needed for it to run. I've been reviewing the deployment guide
http://blogs.msdn.com/b/bethmassi/archive/2010/09/23/configuring-a-machine-to-host-a-3-tier-lightswitch-application.aspx
The article lists that there was a server component, but that it might change when RTM arrived:
NOTE: The team is looking at simplifying this process and possibly making the LightSwitch server component pre-reqs go away so this process will likely change for RTM.
This other MSDN article states that there are prerequisites.
http://msdn.microsoft.com/en-us/library/gg481779.aspx
My webserver admin keeps saying there's nothing to install on the ASP.NET web server other than .NET 4.0.
Am I missing something?
Server setup procedures haven't changed since Beta 1 (although of course the runtime has changed). It's pretty simple; the prerequisites article that you cited has the correct information. Basically the process is:
Install the Web Platform Installer if you don't already have it installed
Fire up the WPI and search for the LightSwitch runtime
Install!
As mentioned in the article, you'll need to decide whether you want to install a new instance of SQL Server locally with the prerequisites. If you've already planned for a production SQL Server, you'll want to choose the "without local SQL" option.
I don't have a specific answer, but I would stand up a VM with the appropriate version of windows server on it and run through an install on a do novo machine. Should confirm or deny what your server admin says . . .

Resources