Using SQL Database data in both Web Page and Mobile Services
hi all,
i trying move service other server azure. service has 3 main parts:
- sql database (where information stored)
- android app (generates information , stores in sql database)
- web page (shows data stored in database)
i have allready succesffully made changes in android app use azure mobile services, , tables data alredy shown in sql database.
now trying implement web page. this, followed tutorials (http://www.windowsazure.com/en-us/documentation/articles/web-sites-dotnet-deploy-aspnet-mvc-app-membership-oauth-sql-database/ and http://www.windowsazure.com/en-us/documentation/articles/web-sites-dotnet-get-started/) not access tables used mobile service. examples use tables using schema "dbo", , tables under schema (with name of mobile service).
i have tried following (without success):
- create new login , user azure sql database default_schema 1 of mobile service
- change default schema in web project (using solution: http://social.msdn.microsoft.com/forums/en-us/e276fb02-ef9b-44eb-b481-699c1c25602d/change-schemaname-for-ef-41-dbcontext?forum=adodotnetentityframework)
- define schema name model class , overriding "onmodelcreating" method of dbcontext:
//in model class: [table("contacts", schema="schemaname")] public class contact { //... } //in context class (dbcontext) protected override void onmodelcreating(dbmodelbuilder modelbuilder) { base.onmodelcreating(modelbuilder); modelbuilder.entity<contactsmanager.models.contact>().totable("contacts", schemaname: "schemaname"); }
can me? idea appreciated.
thanks,
victor
ps: don't know if important, created tables using "manage" azure website, under mobile service, , after got working, tried implement web site
hello,
it seems issue more related windows azure website development, please post question in the windows azure development forum:
http://social.msdn.microsoft.com/forums/en-us/home?forum=windowsazuredevelopment
it more appropriate , experts there assist you.
regards,
fanny liu
fanny liu
technet community support
Microsoft Azure > Azure SQL Database
Comments
Post a Comment