Skenderbegu
Skenderbegu
CC#
Created by Skenderbegu on 4/15/2024 in #help
Entity Framework 6 error - 'Value cannot be null. Parameter name: entitySet'
seems to throw the same error even running a simple query such as:
dbContext.Database.ExecuteSqlCommand("Print 'TEST'");
dbContext.Database.ExecuteSqlCommand("Print 'TEST'");
26 replies
CC#
Created by Skenderbegu on 4/15/2024 in #help
Entity Framework 6 error - 'Value cannot be null. Parameter name: entitySet'
No description
26 replies
CC#
Created by Skenderbegu on 4/15/2024 in #help
Entity Framework 6 error - 'Value cannot be null. Parameter name: entitySet'
This is all I'm getting:
TEST DEBUG ++++++++++++++++++++++++++++++++++++++++++++
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-133576509696931889): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data.OracleClient\v4.0_4.0.0.0__b77a5c561934e089\System.Data.OracleClient.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Exception thrown: 'System.ArgumentNullException' in EntityFramework.dll
An exception of type 'System.ArgumentNullException' occurred in EntityFramework.dll but was not handled in user code
Value cannot be null.
TEST DEBUG ++++++++++++++++++++++++++++++++++++++++++++
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-133576509696931889): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data.OracleClient\v4.0_4.0.0.0__b77a5c561934e089\System.Data.OracleClient.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Exception thrown: 'System.ArgumentNullException' in EntityFramework.dll
An exception of type 'System.ArgumentNullException' occurred in EntityFramework.dll but was not handled in user code
Value cannot be null.
26 replies
CC#
Created by Skenderbegu on 4/15/2024 in #help
Entity Framework 6 error - 'Value cannot be null. Parameter name: entitySet'
Same error still
26 replies
CC#
Created by Skenderbegu on 4/15/2024 in #help
Entity Framework 6 error - 'Value cannot be null. Parameter name: entitySet'
Just tried a second time to make sure, but still got the same error
26 replies
CC#
Created by Skenderbegu on 4/15/2024 in #help
Entity Framework 6 error - 'Value cannot be null. Parameter name: entitySet'
But still got the same error
26 replies
CC#
Created by Skenderbegu on 4/15/2024 in #help
Entity Framework 6 error - 'Value cannot be null. Parameter name: entitySet'
I also tried adding the attribute [Table("WarningTypes")] to the WarningType class
26 replies
CC#
Created by Skenderbegu on 4/15/2024 in #help
Entity Framework 6 error - 'Value cannot be null. Parameter name: entitySet'
WarningTypes
26 replies
CC#
Created by Skenderbegu on 4/15/2024 in #help
Entity Framework 6 error - 'Value cannot be null. Parameter name: entitySet'
Yes, the db already exists
26 replies
CC#
Created by Skenderbegu on 4/15/2024 in #help
Entity Framework 6 error - 'Value cannot be null. Parameter name: entitySet'
But I don't think the text file is really important because the provided Id at that point is not an actual user
26 replies
CC#
Created by Skenderbegu on 4/15/2024 in #help
Entity Framework 6 error - 'Value cannot be null. Parameter name: entitySet'
No description
26 replies
CC#
Created by Skenderbegu on 4/15/2024 in #help
Entity Framework 6 error - 'Value cannot be null. Parameter name: entitySet'
Yes, it's a legacy app which was having a few caching issues using some other framework. Now we're changing it to EF6 temporarily until we move to EF core
26 replies
CC#
Created by Skenderbegu on 4/15/2024 in #help
Entity Framework 6 error - 'Value cannot be null. Parameter name: entitySet'
That's all actually, it's not a partial class, my mistake
26 replies
CC#
Created by Skenderbegu on 4/15/2024 in #help
Entity Framework 6 error - 'Value cannot be null. Parameter name: entitySet'
I already have this on ApplicationDbContext:
public ApplicationDbContext()
: base("name=ApplicationDbContext")
{
}
public ApplicationDbContext()
: base("name=ApplicationDbContext")
{
}
And my webconfig contains
<connectionStrings>
<add name="ApplicationDbContext" connectionString="data source=localhost;initial catalog=DatabaseName;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
</connectionStrings>
<connectionStrings>
<add name="ApplicationDbContext" connectionString="data source=localhost;initial catalog=DatabaseName;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
</connectionStrings>
Would it not throw an error in the using statement if the connection string was empty or wrong in that case?
26 replies