How to use SignalR for Distributed Databases in MVC using LINQ queries? - asp.net-mvc-4

I have three databases for a Web Application (MVC), if any change happens in any database reflect it in web application asynchronously.

Related

How to develop an ASP.NET Razor Pages web application using a cloud database?

I have been using local databases to develop web applications in ASP.NET Razor Pages. My experience was that the local database creates itself simultaneously with the development of the web application.
Currently, I need to work with a cloud database set up in Microsoft Azure. This cloud database already contains tables. How can I connect to the cloud database and call these tables and their attributes in razor pages?
You need read the offical document first.
There are two ways you can set your sqldb connections. One is written in the appsetting.json file, and the other is set in the portal, as mentioned in the official documentation.
The difference between the two is that the setting priority in the portal is higher than the configuration in the code file, and the configuration will be overwritten when it is released.
For novices, you can get the Connection strings in the portal. Then you first ensure that your program can run normally, and replace the connection string in the appsetting.json file with the string provided in the portal. If normal CURD operation is possible, then the connection is successful.

Azure Mobile Services Insert function

Is it possible to handling handling external inserts/updates to Azure SQL Database from Azure Mobile Services (INSERT, UPDATE, directly to db and etc.)
I know about scripting. All tables working fine, and visible from Mobile Service manage center.
I need to handle events like direct SQL requests to DB from DB management portal or Azure Web sites, without direct requests to Mobile Service (REST API, and etc.)
Is the question how to execute SQL commands from a mobile device directly against the database (SQL Database) without first going through the REST API and scripting layer Mobile Services provides?
If so, then the answer is essentially no. The mobile device needs some way to communicate with the database, it uses the API and scripting layer to do this. Of course, you could build your own web service layer that then works with the database. But, this layer is what Mobile Services is providing for you out-of-the-box.
However, if the question is can you issue SQL commands against the database using tools like SQL Server Management Studio or even other web sites, then the answer is yes. The SQL Database which Mobile Services provides is a regular SQL Database. You have full control over it. You can connect to it and issue commands just like you would with SQL Database (via an ORM or direct SQL statements).

Strategies for testing multi-user desktop application

We are developing a multi-user desktop application with C# 3.5, windows forms and sql 2008.
There are various things I want to test -
1) performance - how application behaves when multiple users are accessing the database?
2) How to simulate a conflict, and test how application is helping out the user.
How can I test the above scenarios?
Any other scenarios you can think of?
thanks
We need to see how the application communicates with DB layer
Web Services or stored procedure calls
For Stored proceduress I would suggest using SQLQueryStress - sql server query performance testing tool
Alternatively if it through web services I would suggest testing using VSTT
VSTT has good information and articles on web testing, load testing
Visual Studio Performance Testing Quick Reference Guide (Version 2.0) Published http://blogs.msdn.com/b/edglas/archive/2010/04/13/visual-studio-performance-testing-quick-reference-guide-version-2-0-published.aspx
One more alternate option is
SQL 2008 has data services - Exposing Stored procedures as Web Services
You can exposre core procedures and load test them as web services in VSTT

aspnet_regsql.exe and MVC

Can someone explain what aspnet_regsql.exe is really used for?
When I create a standard ASP.NET MVC project in VS2008 and register a user, I get the db created with corresponding asp.net membership tables etc.
This uses the SQL Server Express 2005 as standard.
The forums I have found states that aspnet_regsql.exe is used when one is migrating the created SQL Server Express db to a SQL Server, fx. to a hosting server. I am right about this?
But is this change a global change, meaning that next time I start a new MVC project or standard Win Forms project and add a db, it will use SQL Server as provider and not SQL Server Express? Or is this aspnet_regsql.exe only used on a project basis?
Like you say, the aspnet-regsql will create the tables into any (Express or not) version of SQL Server. I -think- your main question is how do you know which database you're attaching to, right? If so, then that is handled in your web.config file in the "Membership" provider area. What I do is use a SqlMembershipProvider for my development (utilizing the tables created with aspnet_reqsql) and then switch to ActiveDirectoryMembershipProvider for production.
MSDN Article on aspnet_reqsql
aspnet_regsql.exe is a utility designed to prepare a database to work with asp.net providers. These providers provide services to asp.net applications such as user membership, roles, and profile management and require a database that adhere to specific schemas.
By running this application you can alter an existing database to adhere to these schemas or create the default database for these services (aspnetdb.mdf?).
I believe that the utility might also prepare some of the intrinsics for provider usage.

Data access in Silverlight 2.0

I'm new to silverlight and I'm porting from asp.net 2.0. I have done many data binding applications in asp.net where I use sql server 2005 and use it's tables and access them via sqlconnection object and perform all kind of database related functions. Can anyone tell does silverlight 2.0 supports such kind of facility. If so can I use any database server, if not is it through web services? can anyone point me some good place to start with.
No you can't connect directly to a database server. You need to use a web service. However to simplify things you can call a data web service such as SQL Server Data Services or Amazon S3. Otherwise use REST.
Silverlight is a client side technology. You can't access a database on the server directly. You have to use a layer in between, like webservices. For a nice tutorial on how to do that, check http://weblogs.asp.net/scottgu/pages/silverlight-2-end-to-end-tutorial-building-a-digg-search-client.aspx