I've an asp.net web API connecting to SQL server with migration enabled both in the asp.net web API visual studio solution ( migration folder present in the solution) and SQL server DBA which has the _Migration history table created.
Now, I want my asp.net web api connect to the another New dB which has the same tables along with their schema as the old dB.
I need to connect to the new dB seamlessly without creating the migration history table in the new dB. I know we can enable migration by running the update database command from the package manager console. But I need my asp.net web API to connect to the new dB with out creating creating migration history table in the new dB.
Please suggest me how to achieve this. Thank you
Related
I create a new MVC project with user authentication by the following commands.
dotnet new mvc -o ProjectName --auth Individual
However, it's using sqlite database by default. I know that adding -uld will use localDB instead.
I would like to ask if there is any way to use SQL Server directly.
I tried to migrate the sqlite database to SQL server database but there are some error messages during the migration.... Thus, I would like to ask if there is any better way to do it.
Thank you.
I've been trying for days but cannot find the answer to this. I am using Oracle Application Express (APEX), someone else setup the initial connection to a "Apex" database in oracle, but I am trying to connect to our production database in oracle. I am making web forms and the web forms are connected to the "Apex" database that was setup already, but I need to connect to our production database so we can create reports from the data entered through the web forms. I need the tables to show up in the create page option from the production database, currently its coming from the apex database, please help.
Create Page View with Tables (from apex)
Thank You so much in Advance!
What is the "production database"? Is it really a different database (than the one you're currently connected to), or is it a user in the same database?
if former:
you could create a database link between those two databases and create synonyms for production users' tables in one of schemas your workspace is assigned to.
another option is to install Apex onto the production database, so that you could use current installation as "development" and then deploy the application into the "production-based" Apex
if latter, you might do the same (i.e. create synonyms, just without the database link), or simply assign the production schema to your workspace
You may be interested to read Mike's response to a question with a similar misunderstanding regarding architecture.
https://community.oracle.com/thread/4135843
Once you have your head wrapped around this, you can consider the parsing schema to your application. This schema defines the table access your application has, in the normal way Oracle handles table privileges.
Then it's up to you to define who has access to what pages, using APEX Authorisation Schemes.
I'm developing an ASP.NET WebForms application with Entity Framework Database-First connected with SQL Server, and I want to connect the same Entity Data Model with Oracle Database.
My concerns are:
How to install Oracle Database Engine on my dev machine to test?
How to connect the data model with Oracle instead of SQL Server?
How to generate the same schema into Oracle?
Are there drivers, tools, or apps I need to install?
I am doing exactly the same as you
i.e. Converting a ASP.NET MVC application on SQL server to Oracle.
Since your application is already running, what you can do, is
generate create scripts from your SQL Server database,
create the same tables in Oracle.
Install ODP.NET from
here.
This will allow you to connect to Oracle from a .NET application.
Now create a new edmx file from the tables in Oracle and if you do
everything properly, your application should be running.
Note: ODP.NET provider is only visible if you have a VS license. It is not visible on the free version.
I'm working through this tutorial:
Deploying an ASP.NET Web Application to a Windows Azure Web Site and SQL Database
In the second part "Enable Migrations and create the database" I need to use the NuGet Package Manager console to enter a series of commends:
enable-migrations -ContextTypeName ToDoListApp.Models.ToDoDb
add-migration-initial
update-database
Why do I need to do this explicitly? Shouldn't this be wrapped up in the publish process?
Thanks
Dave
The migrations process is separate from Azure. You can have an MVC 4 project that uses database migrations but the database is not hosted on Azure. The commands you are referencing simply enable the migrations in any MVC 4 project.
I find updating the database dangerous, so I actually prefer it to be separated from the publishing process because this way someone on your team is able to update the logic of the website without pushing updates to the database.
I'm new to dot net. I have a sql 2008 database. Trying to create an application that has role based authentication. Want to use the login controls that comes with vs2010. When i tried using it, it creates its own db.
Is it possible to create these tables in my own db ie sql 2008 and map it to these login controls?
At first install membership's database into own DB with aspnet_regsql.exe util.
Configure your membership provider in web.config and set up connection string to own DB.
More details: http://msdn.microsoft.com/en-us/library/ff648345.aspx