Up to EF5, in order to connect to SQL Server 2012, all I needed to to is specify a connection string that looks something like this:
Data Source=.\SqlExpress;Initial Catalog=MyDatabase;Integrated security=True;MultipleActiveResultSets=True
This method is not working with EF6, giving exception
No Entity Framework provider found for 'System.Data.Odbc' ADO.NET provider. Make sure the provider is registered in the 'entityFramework' section of the application config file
I am not using app.config file at all, I am passing above connection string to MyContext constructor. WHy is it trying to use Odbc provider at all, and instead not using System.Data.SqlClient?
What needs to be done to connect to SQL Server with EF6 code-first? I made sure that EntityFramework.dll and EntityFramework.SqlServer.dll are both available in Application folder. I have even added EF6 nuget package v6.0.0.1 in WPF project, although it does not use EF library directly, and making sure that automatically created App.Config file (by nuget) is copied to Application (Debug) folder - still no success.
I have also tried to setprovider manually in code:
public class OeeCoachConfiguration : DbConfiguration
{
public OeeCoachConfiguration()
{
SetProviderServices("System.Data.SqlClient",
System.Data.Entity.SqlServer.SqlProviderServices.Instance);
}
}
Still no success. My Project structure is as follows (simplified):
WPF project - does not have reference to EF (also tried adding EF reference)
ViewModel class library - does not have reference to EF
Model class library - has reference to EF library (both dlls)
Data class library - has reference to UI library (both dlls).
I am using CodeFirst approach, and this setup works without any problem with EF5. Any help is greatly appreciated.
For me this error was resolved by removing the Glimpse.ADO package
Edit December 20, 2013 I believe the Glimpse.ADO package now supports EF6, but I have not tested it.
I had the same problem and I eventually tried the following and it worked (keeping Glimpse EF5 & Glimpse ADO packages)
In the web.config I added a copy of the existing provider line but changed it's invariantName to "System.Data.Odbc".
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.Odbc" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
Hope that this helps.
Jonathan
Yes, for me it was resolved by removing Glimpse.ADO and Glimpse.EF5 nuget packages. Thank you.
Option 1: Try adding following in app.config of the executable project.
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
Option 2: If you want to use code based provider registration, follow guideline on Entity Framework Providers for EF6
Make sure you have the DbConfiguration in the same assembly as the DbContext of your application.
Related
I am currently working on an application which was build around EF4 connecting to MSSQL.
Now it was decided, that we should also be able to connect to SQLite.
I've upgraded the application to EF6, made sure everything works as intended with MSSQL and am now trying to get the application to connect to an SQLite DB (which is a converted version of our mssql db).
Sadly I've kinda hit a wall here.
If I try to create the SQLite connection the same way we do for MSSQL
EntityConnectionStringBuilder entityBuilder = new EntityConnectionStringBuilder();
entityBuilder.Provider = "System.Data.SQLite.EF6";
entityBuilder.ProviderConnectionString = "data source=sqlite_master.db";
entityBuilder.Metadata = #"res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl";
connection = new EntityConnection(entityBuilder.ToString());
connection.Open();
theEntities = new masterEntities(connection); // masterEntities extends System.Data.Entity.DbContext
getDataBaseVersion();
I get an Exception stating that "System.Data.SQLite.SQLiteConnection" cannot be converted to "System.Data.SqlClient.SqlConnection" in the getDataBaseVersion Method (which is the first one to run a query on the entities).
I've already tried out a few things, but always got either this or an "unintended code first exception".
Btw: I don't really need to create the connection strings for the SQLite version at runtime. If the problem can be fixed by using the config file, I'll gladly do it.
My app.config looks like this:
<entityFramework>
<providers>
<provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite"/>
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite"
type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
</DbProviderFactories>
</system.data>
My guess is that somewhere within the entity data model the data.sqlclient class is set to be used. But I can't create a second Entity Data Model, as then all classes and properties would be definded twice. (I also can't because the sqlite data source won't show up in the assistent for entity data model, but I hope to be able to fix that by reinstalling everything)
Now I wonder: Is it even possible to use two different providers within the same application for the same model?
If yes, I'd be very happy if someone could point me towards a solution to get it working.
Update
I think I've made some progress last night: after adding .EF6 to every System.Data.SQLite in the app.config I now get a different exception.
the app config now looks like this:
<entityFramework>
<providers>
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
</DbProviderFactories>
</system.data>
I now get an exception stating that the provider name for providerfactory "System.Data.SQLite.SQLiteFactory" cannot be found.
I haven't looked into it yet, gonna do so over the course of the day.
-edit-
My project currently references (among others)
EntityFramework.dll // from nuget
EntityFramework.BulkInsert // from nuget
EntityFramework.MappingAPI // from nuget
EntityFramework.SqlServer // from nuget
System.Data
System.Data.DataSetExtensions
System.Data.Linq
System.Data.SQLite // from the sqlite-netFx451-setup-bundle-x86
System.Data.SQLite.EF6 // from the sqlite-netFx451-setup-bundle-x86
Ok, I give up now.
I've now created a DB-First SQLite Model and I get the same exception, just reversed, when trying to connect to it with the MSSQL Provider.
Looks like I will have to use plan B and compile two versions of our application. One for sqlite and one for mssql.
I've run into some issues with MSTest when they're run inside teamcity. When I run them inside VisualStudio on local machine, everything works good.
[08:05:21][ProjName.Data.Tests.HistoryTableHandlingTest.HistoryProgressTest] Class Initialization method ProjName.Data.Tests.HistoryTableHandlingTest.Init threw exception. System.InvalidOperationException: System.InvalidOperationException: The 'Instance' member of the Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' did not return an object that inherits from 'System.Data.Entity.Core.Common.DbProviderServices'. Entity Framework providers must inherit from this class and the 'Instance' member must return the singleton instance of the provider. This may be because the provider does not support Entity Framework 6 or later; see http://go.microsoft.com/fwlink/?LinkId=260882 for more information..
Here's my app.config for MSTest project:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
Another thing that I'd like to mention is, that I don't use EntityFramework library from NuGet, but it's clone EntityFramework.HierarchyId (it can be found in NuGet as well).
After I rewrote all tests to NUnit, I got the same results.
But it seems, that the main reason of this behavior was, that on the build agent MS Sql Server Express wasn't installed properly.
When I re-installed latest version of SQL Express, everything started to work as a sharm. It seems that system was missing some drivers or libraries for LocalDB.
I hope that this will help someone else.
I'm trying to understand how SQlite and entity frameworks interacts.
I create a new fresh console project in my visual studio 2013. I install the nuget packet of SQlite 1.0.92.
I create a new empty model (edmx) and try to populate it from a static example database (such as northwind.db).
After this I get this error: error 0175: the ado.net provider named "System.Data.SQLite.EF6" is not registered on the computer.
Any ideas?
Thank you
Lorenzo
After some tests I found a possible solution. Let's start from the beginning:
Download the SQLite ado.net provider from sqlite server (x86 version).
You have to manually register in the GAC those three libraries: system.data.sqlite, system.data.sqlite.ef6, system.data.sqlite.designer with gacutil
Start visual studio 2013. Add reference to nuget sqlite 1.0.92.0 (This will add reference to entity framework 6.1 too).
Your app.config will look like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite" />
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
<remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".Net Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
</DbProviderFactories>
</system.data>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
<connectionStrings>
Add a new Sqlite connection to the db in your server explorer and test it.
Now add and create a new empty ado.net entity model to your project.
This should work... but when your run the application and pick up some records in one of the dbset you will get an exception telling you that there's no ado.net provider registered for your connection (system.data.sqlite).
Go to your config file and add this to you provider section (just copy the previous sqlite line and cut the .ef6 postfix in the invariant name):
<provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
Save all and rebuild the application. Now it works but if you go back to the model detail and try to refresh the model from the db you will get a provider exception again. Comment the last provider added and retry. IT WORKS!!!
I think it's due to a conflict between provider names in the syste.data.sqlite and system.data.sqlite.ef6
Despite this I can't do model first (project a model and then create a new database from it) because I get another ado.net provider exception.
Any ideas about that?
Thank you
Lorenzo
_________________ UPDATE 04-2014 _________________
After some testing and googling...
I read that when you want to use the VS design tools you have to install the right x86 version of the SQLite drivers. These drivers, to work properly with the VS tools, needs to register their version of the System.Data.SQLite in the GAC during the installation process (only after this VS knows where to find the connection provider for the design tools).
When you use the model-first approach and you ask the model to create the db instead of use the correct driver registered in you app.config it tryes to open the entity connection with the one registered in GAC and used by the visualmodel creation tool (and wich is not compatible). I think there's no way at the moment to use the VS's entity modelling tool with the SQLite provider.
Lorenzo
#LoxLox : I don't think you have to register dll with GAC. I have same problem like yours but I just need to edit the .config file as discussed in this post by adding .EF6 suffix to invariant.
I got the following error when I used sqlce 4.0 with entityframework 6.0
No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlServerCe.4.0'
My app.config looks like this
....
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false" />
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" >
<parameters>
<parameter value =" System.Data.SqlServerCe.4.0" />
</parameters>
</defaultConnectionFactory>
<!--providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers-->
</entityFramework>
<connectionStrings>
<add name="FbMultipleInsOrderContainer" connectionString="metadata=res://*/FbMultipleInsOrder.csdl|res://*/FbMultipleInsOrder.ssdl|res://*/FbMultipleInsOrder.msl;provider=System.Data.SqlServerCe.4.0;provider connection string="data source=|DataDirectory|\FBMultipleOrderSync.sdf"" providerName="System.Data.EntityClient" />
</connectionStrings>
...
I tried re-installing EF 6. But no avail.
Any clue on this would be much appreciable.
After installing the EntityFramework.SqlServerCompact nuget package, check that your app.config contains the following (as per #ErikEJ's comment above):
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" />
</providers>
(You can leave the line for SqlClient even though you don't really need it.)
ErikEJ has pointed this out, but I'd like to highlight the fact, you MUST remember to install the Nuget package
EntityFramework.SqlServerCompact
I tried following the recommended answer, but didn't realise I didn't have the required NuGet package the App.config was referencing.
I met the issue in my unit tests. The tricky thing was that the error had appeared not constantly.
I managed to solve it by adding the follwing class my my unit tests solution:
public static class Trick
{
public static void FixEfProviderServicesProblem()
{
// this commented line should be used for SQL Server provider
//var instance = System.Data.Entity.SqlServer.SqlProviderServices.Instance;
// this is used for SQL Server CE provider
var instance = System.Data.Entity.SqlServerCompact.SqlCeProviderServices.Instance;
}
}
To achieve this you just need to register the EntityFramework.SqlServerCompact in Package Manager Console,
To do this open power manager console and type below command:
PM> Install-Package EntityFramework.SqlServerCompact
To resolve this problem
Visual Studio Menu -> Tools -> NuGet Package Manager - > Manage NuGet Packages for Solution
Select 'Browse' Tab and search for following 'EntityFramework.SqlServerCompact'
Install it.
It should work.
My issue was the unit tests. You likely only installed the Entity framework for your project, but not your unit tests. To do so:
Right click "Solution" in Solution Explorer (not your project's name)
Click "Manage NuGet Packages"
Search for EntityFramework and press it
You will probably not see a tick next to [Project Name].Tests
This error arose on a User PC. The user ignored a previous error "The ‘DbProviderFactories’ section can only appear once per config file".
Apparently DB2 corrupted the machine config file on her PC, by adding a duplicate (and empty) <DbProviderFactories /> tag.
The solution was to delete the empty duplicate tag. The machine config file is located in [WindowsDir]\Microsoft.Net\Framework[.NET Version]\Config\Machine.config
the solution provided is correct but it does not explain why EF need this assembly. Here is Why...
By default EF's configuration allow you to have a "defaultConnectionFactory" uder entityFramework section. This default factory is configured to "LocalDbConnectionFactory" and its param is "mssqllocaldb".
This factory internally requires "SqlServerCe.4.0" i.e. "SqlServerCompact".
The error happens only if the EF uses its default connection string in DbContext. If EF is provided with some other specified Connection string in your config then this error does not appear. Because EF by default uses the default connection factory.
once you install "SqlServerCe 4.0" the configuration of EF is changed and "LocalDbConnectionFactory" and its param is "mssqllocaldb" are replaced with "SqlServer Ce 4.0". and EF runtime is also able to find the SqlServerCe4.0 Assembly (as it is now part of your references and physically placed in your BIN).
Following is the EF Config before and after installing Sql Server Compact
OLD Config:
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
The new configuration is as below:
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework">
<parameters>
<parameter value="System.Data.SqlServerCe.4.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" />
</providers>
</entityFramework>
and also it added the following section to describe new Factory
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SqlServerCe.4.0" />
<add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</DbProviderFactories>
</system.data>
Don't forget that Package Manager Console takes app.config/web.config from selected as Startup project!
For me, because the programmer is not only one, some programmer is already install EntityFramework.SqlServerCompact, but when I pull in my PC and RUN shows above error message, then I just Uninstall and install again.
Within Visual Studio, all the .dll files that exist in _bin_deployableAssemblies folder need to be set to Build Action : none
All the .dll's for me were set to content.
This is what I set it to, and it worked straight after:
I add the provider code below to the Web.config,and install the EntityFramework.SqlServerCompact package both, and then solve the problem.
If lacking one, it fails.
<provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact"/>
I'm playing around with EF different workflows. Yesterday I made a new project and Entity Framework 6 was the first suggestion from Nuget so I decided to give it a try, also it is a very small project entirely for learning purposes so I guess it will be good experience to try EF 6 since I've been working mostly with Ef 5.
My Application is based on Code First approach. The structure of the solution is shown in the print screen:
The project CodeFirstClasses is meant to hold my Entites. For simplicity purposes and because I follow a tutorial I use only one class as you may see - Customer.cs. There I have :
public class RewardContext : DbContext
{
//Specify the name of the base as Rewards
public RewardContext() : base("Rewards")
{
}
//Create a database set for each data item
public DbSet<Purchase> Purchases { get; set; }
public DbSet<Customer> Customers { get; set; }
}
And the other classes - Purchase and Customer which are trivial, so I won't paste them here.
The other project as you can see is Windows Forms project with just one form and button on it. On the click event of the button I have all the logic for adding new records to my two entities hardcoded. Here is just a part of it:
//some code...
//Add the record and save it
context.Customers.Add(newCustomer);
context.Purchases.Add(newPurchase);
context.SaveChanges();
MessageBox.Show("Record Added!");
So far nothing different from what I'm used to with EF 5. I can build the project, I can run it, and everything is executed as expected. However I get this warning from the title :
Warning 1 The element 'entityFramework' has invalid child element 'providers'. List of possible elements expected: 'contexts'. And even though I'm using mostly MS SQL Server Management Studio I've noticed that I'm not able to manage my connections/databases from the IDE - Visual Studio 2012, but this was not an issue with EF 5.
My research narrowed down the possible source of problem/solution to manually changing the App.config file, but this is an area where I haven't got much experience especially when the IDE took care of it until EF 6. So I'll post both my App.config files for this solution :
The one from the CodeFirstClasses project :
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
And from my TestCodeFirst project:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
And the other possible solution that I found is : updating the xsd for "validating" EF config section in web/app.config file to recognize newly added EF6 elements which I'm also not aware of how exactly to do it.
Even though when I open the MS SQL Server Management Studio I see the database created for this application, the records are saved and generally it seems to work but yet I would like to resolve this warning and get to know how to set up my applications based on EF 6 right.
You can install the EF6 Designer for VS2012 from here and it will update the schema that validates config files.
The configuration schema was changed from version 5 to 6. As it says, the providers node was replaced with a contexts node.
The idea is that you can configure the providers individually instead of all contexts using the same provider. (This goes in tandem with being able to have multiple contexts that reside within one database. This used to be called multi-tenant but was later renamed to be more concise)