Search found 12 matches
- Thu 28 Oct 2021 15:53
- Forum: dotConnect for MySQL
- Topic: [EF Core 6] Method not found: 'Int64 RelationalExtensionInfo.GetServiceProviderHashCode()'.
- Replies: 4
- Views: 37800
Re: [EF Core 6] Method not found: 'Int64 RelationalExtensionInfo.GetServiceProviderHashCode()'.
No problem. We moved to pomelo which fully support EF 6 RC.2
- Thu 28 Oct 2021 08:34
- Forum: dotConnect for MySQL
- Topic: [EF Core 6] Method not found: 'Int64 RelationalExtensionInfo.GetServiceProviderHashCode()'.
- Replies: 4
- Views: 37800
[EF Core 6] Method not found: 'Int64 RelationalExtensionInfo.GetServiceProviderHashCode()'.
Hi,
after upgrading to .NET 6 im getting this error:
on constructor:
i know that EF Core 6 is not yet officialy supported, but maybe do you have any idea how to fix this error?
More info: https://github.com/dotnet/efcore/issues/26022
after upgrading to .NET 6 im getting this error:
Code: Select all
An exception of type 'System.MissingMethodException' occurred in Microsoft.EntityFrameworkCore.dll but was not handled in user code
Method not found: 'Int64 RelationalExtensionInfo.GetServiceProviderHashCode()'.
Code: Select all
{
public partial class ApplicationDbContext : IdentityDbContext<ApplicationUser, ApplicationRole, int>
{
public ApplicationDbContext(DbContextOptions options) : base(options)
{
}
}
i know that EF Core 6 is not yet officialy supported, but maybe do you have any idea how to fix this error?
More info: https://github.com/dotnet/efcore/issues/26022
- Fri 30 Jul 2021 09:25
- Forum: Entity Framework support
- Topic: Maping to decimal - precision/scale ignored
- Replies: 2
- Views: 15302
Maping to decimal - precision/scale ignored
Hi,
for some reason my setting from mapping are ignored while script is generated.
Code:
Generated script:
Why there is decimal(58,29)?
Any idea how to fix it?
for some reason my setting from mapping are ignored while script is generated.
Code:
Code: Select all
builder.Property(x => x.Rate)
.HasColumnType("DECIMAL")
.HasPrecision(10, 4);
Code: Select all
CREATE TABLE Vat (
Id int AUTO_INCREMENT UNIQUE NOT NULL,
Name varchar(50) NULL,
Rate decimal(58,29) NOT NULL,
CreatedDate datetime NOT NULL,
ModifiedDate datetime NOT NULL,
IsActive bit(1) NOT NULL,
PRIMARY KEY (Id)
);
Any idea how to fix it?
- Mon 17 May 2021 19:17
- Forum: Entity Developer
- Topic: BaseEnitity - how to do this in EntityDeveloper
- Replies: 1
- Views: 2753
BaseEnitity - how to do this in EntityDeveloper
Hi,
my code looks like this:
and mappings
How can i do the same in entity developer? I can set BaseType to BaseEntity but when i generate code there is no mapping for properties from BaseEntity class.
my code looks like this:
Code: Select all
public class BaseEntity
{
public int Id { get; set; }
public DateTime CreatedDate { get; set; }
public DateTime ModifiedDate { get; set; }
public bool IsActive { get; set; }
public bool IsDeleted { get; set; }
}
Code: Select all
public class Customer : BaseEntity
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
Code: Select all
public class CustomerMap : IEntityTypeConfiguration<Customer>
{
public void Configure(EntityTypeBuilder<Customer> builder)
{
builder.HasKey(x => x.Id).HasName("pk_customerid");
builder.Property(x => x.Id).ValueGeneratedOnAdd().HasColumnName("id");
builder.Property(x => x.FirstName).HasColumnType("varchar(50)");
builder.Property(x => x.LastName).HasColumnType("varchar(50)");
builder.Property(x => x.CreatedDate)
.HasColumnName("created_date")
.HasColumnType("datetime");
builder.Property(x => x.ModifiedDate)
.HasColumnName("modified_date")
.HasColumnType("datetime");
builder.Property(x => x.IsActive)
.HasColumnName("is_active")
.HasColumnType("bit")
.HasDefaultValue(1);
builder.Property(x => x.IsDeleted)
.HasColumnName("is_deleted")
.HasColumnType("bit")
.HasDefaultValue(0);
}
}
- Tue 06 Apr 2021 12:20
- Forum: Entity Developer
- Topic: Unable to download Entity Developer - 404 - File or directory not found.
- Replies: 1
- Views: 2609
- Wed 03 Feb 2021 15:56
- Forum: Entity Developer
- Topic: Custom tool error: bufferAdapter is not a VsTextDocData
- Replies: 23
- Views: 22550
Re: Custom tool error: bufferAdapter is not a VsTextDocData
Any idea when it will be fixed? Have same issue.
VS Info:
Microsoft Visual Studio Professional 2019
Version 16.8.4
VisualStudio.16.Release/16.8.4+30907.101
Microsoft .NET Framework
Version 4.8.03752
Installed Version: Professional
ASP.NET and Web Tools 2019 16.8.557.25636
ASP.NET and Web Tools 2019
ASP.NET Core Razor Language Services 16.1.0.2052803+84e121f1403378489b842e1797df2f3f5a49ac3c
Provides languages services for ASP.NET Core Razor.
ASP.NET Web Frameworks and Tools 2019 16.8.557.25636
For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0 16.8.557.25636
Azure App Service Tools v3.0.0
Azure Functions and Web Jobs Tools 16.8.557.25636
Azure Functions and Web Jobs Tools
C# Tools 3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Devart dotConnect for MySQL 8.19.1792.0
Devart dotConnect for MySQL
Copyright 2002 - 2020 Devart. All rights reserved.
Web: www.devart.com/dotconnect/mysql
Support: [email protected]
Devart Entity Developer 6.10.1165.0
Devart Entity Developer
Copyright © 2008-2021 Devart. All rights reserved.
Web: www.devart.com/entitydeveloper
Support: [email protected]
Extensibility Message Bus 1.2.6 (master@34d6af2)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.
IntelliCode Extension 1.0
IntelliCode Visual Studio Extension Detailed Info
Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.30924.1
Microsoft Continuous Delivery Tools for Visual Studio 0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft Library Manager 2.1.113+g422d40002e.RR
Install client-side libraries easily to any web project
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual Studio Tools for Containers 1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.
Mono Debugging for Visual Studio 16.8.43 (00471f8)
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 5.8.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
SQL Server Data Tools 16.0.62012.31170
Microsoft SQL Server Data Tools
Syntax Highlighting Pack 2.8.134
Adds syntax highlighting and snippet support for a wide variety of programming languages such as Clojure, Go, Jade, Lua, Swift, Ruby and many more...
TypeScript Tools 16.0.21016.2001
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 16.8.0-beta.20507.4+da6be68280c89131cdba2045525b80890401defd
Microsoft Visual F# Tools
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Container Tools Extensions 1.0
View, manage, and diagnose containers within Visual Studio.
Visual Studio Tools for Containers 1.0
Visual Studio Tools for Containers
Visual Studio Tools for Unity 4.8.2.0
Visual Studio Tools for Unity
VisualStudio.DeviceLog 1.0
Information about my package
VisualStudio.Foo 1.0
Information about my package
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
Xamarin 16.8.000.261 (d16-8@bb99248)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 16.8.0.507 (remotes/origin/d16-8@e87b24884)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin Templates 16.8.112 (86385a3)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.
Xamarin.Android SDK 11.1.0.26 (d16-8/a36ce73)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: 5e9cb6d
Java.Interop: xamarin/java.interop/d16-8@79d9533
ProGuard: Guardsquare/proguard/proguard6.2.2@ebe9000
SQLite: xamarin/sqlite/3.32.1@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-8@2fb1cbc
Xamarin.iOS and Xamarin.Mac SDK 14.8.0.3 (c51fabee8)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
VS Info:
Microsoft Visual Studio Professional 2019
Version 16.8.4
VisualStudio.16.Release/16.8.4+30907.101
Microsoft .NET Framework
Version 4.8.03752
Installed Version: Professional
ASP.NET and Web Tools 2019 16.8.557.25636
ASP.NET and Web Tools 2019
ASP.NET Core Razor Language Services 16.1.0.2052803+84e121f1403378489b842e1797df2f3f5a49ac3c
Provides languages services for ASP.NET Core Razor.
ASP.NET Web Frameworks and Tools 2019 16.8.557.25636
For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0 16.8.557.25636
Azure App Service Tools v3.0.0
Azure Functions and Web Jobs Tools 16.8.557.25636
Azure Functions and Web Jobs Tools
C# Tools 3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Devart dotConnect for MySQL 8.19.1792.0
Devart dotConnect for MySQL
Copyright 2002 - 2020 Devart. All rights reserved.
Web: www.devart.com/dotconnect/mysql
Support: [email protected]
Devart Entity Developer 6.10.1165.0
Devart Entity Developer
Copyright © 2008-2021 Devart. All rights reserved.
Web: www.devart.com/entitydeveloper
Support: [email protected]
Extensibility Message Bus 1.2.6 (master@34d6af2)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.
IntelliCode Extension 1.0
IntelliCode Visual Studio Extension Detailed Info
Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.30924.1
Microsoft Continuous Delivery Tools for Visual Studio 0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft Library Manager 2.1.113+g422d40002e.RR
Install client-side libraries easily to any web project
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual Studio Tools for Containers 1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.
Mono Debugging for Visual Studio 16.8.43 (00471f8)
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 5.8.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
SQL Server Data Tools 16.0.62012.31170
Microsoft SQL Server Data Tools
Syntax Highlighting Pack 2.8.134
Adds syntax highlighting and snippet support for a wide variety of programming languages such as Clojure, Go, Jade, Lua, Swift, Ruby and many more...
TypeScript Tools 16.0.21016.2001
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 3.8.0-5.20604.10+9ed4b774d20940880de8df1ca8b07508aa01c8cd
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 16.8.0-beta.20507.4+da6be68280c89131cdba2045525b80890401defd
Microsoft Visual F# Tools
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Container Tools Extensions 1.0
View, manage, and diagnose containers within Visual Studio.
Visual Studio Tools for Containers 1.0
Visual Studio Tools for Containers
Visual Studio Tools for Unity 4.8.2.0
Visual Studio Tools for Unity
VisualStudio.DeviceLog 1.0
Information about my package
VisualStudio.Foo 1.0
Information about my package
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
Xamarin 16.8.000.261 (d16-8@bb99248)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 16.8.0.507 (remotes/origin/d16-8@e87b24884)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin Templates 16.8.112 (86385a3)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.
Xamarin.Android SDK 11.1.0.26 (d16-8/a36ce73)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: 5e9cb6d
Java.Interop: xamarin/java.interop/d16-8@79d9533
ProGuard: Guardsquare/proguard/proguard6.2.2@ebe9000
SQLite: xamarin/sqlite/3.32.1@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-8@2fb1cbc
Xamarin.iOS and Xamarin.Mac SDK 14.8.0.3 (c51fabee8)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
- Thu 28 Jan 2021 17:01
- Forum: Entity Developer
- Topic: IdentityDbContext
- Replies: 6
- Views: 2389
Re: IdentityDbContext
It works but...
- when context base class is IdentityDbContext its missing "using Microsoft.AspNetCore.Identity.EntityFrameworkCore;" - it can be fixed by setting base to class to: Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext
- protected override void OnModelCreating(ModelBuilder modelBuilder) need "base.OnModelCreating(modelBuilder);" which is removed everytime when code is generated
- other base classes like "IdentityUser" or "IdentityRole" need also "using Microsoft.AspNetCore.Identity;" or full namespace.
Summary:
- the real problem is "base.OnModelCreating(modelBuilder);"
- when context base class is IdentityDbContext its missing "using Microsoft.AspNetCore.Identity.EntityFrameworkCore;" - it can be fixed by setting base to class to: Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext
- protected override void OnModelCreating(ModelBuilder modelBuilder) need "base.OnModelCreating(modelBuilder);" which is removed everytime when code is generated
- other base classes like "IdentityUser" or "IdentityRole" need also "using Microsoft.AspNetCore.Identity;" or full namespace.
Summary:
- the real problem is "base.OnModelCreating(modelBuilder);"
- Thu 28 Jan 2021 16:16
- Forum: Entity Developer
- Topic: IdentityDbContext
- Replies: 6
- Views: 2389
- Thu 28 Jan 2021 12:43
- Forum: Entity Developer
- Topic: IdentityDbContext
- Replies: 6
- Views: 2389
- Mon 25 Jan 2021 17:47
- Forum: Entity Developer
- Topic: IdentityDbContext
- Replies: 6
- Views: 2389
IdentityDbContext
Hi,
how can i use IdentityDbContext in Entity Developer? Any tips?
how can i use IdentityDbContext in Entity Developer? Any tips?
- Mon 25 May 2020 16:54
- Forum: dotConnect for MySQL
- Topic: DbUpdateConcurrencyException - wrong SQL generated
- Replies: 1
- Views: 3210
DbUpdateConcurrencyException - wrong SQL generated
Dont know why but this simple code:
generates DbUpdateConcurrencyException. Checked debug and noticed that instead of INSERT there is called update:
Any idea how to fix it?
Code: Select all
Guild guild = _context.Guilds.Where(w => w.GuildId == guildId).SingleOrDefault();
if (guild != null)
{
GuildMemberRank guildMemberRank = (guild.GuildMembers.Count() == 0 ? GuildMemberRank.GuildMaster : GuildMemberRank.Member);
guild.GuildMembers.Add(new GuildMember() { GuildRank = guildMemberRank, JoinDate = DateTime.Now, UserId = userId });
_context.SaveChanges();
}
else
{
throw new AppException("Guild not found!");
}
Code: Select all
Executed DbCommand (5ms) [Parameters=[p3='?' (DbType = Int32), p0='?' (DbType = Int32), p1='?' (DbType = Int32), p2='?' (DbType = DateTime)], CommandType='Text', CommandTimeout='30']
UPDATE GuildMembers SET GuildId = :p0, GuildRank = :p1, JoinDate = :p2 WHERE UserId = :p3;
- Sat 06 Apr 2019 20:16
- Forum: Entity Developer
- Topic: EF Core Model (code first) - mapping string to varchar with length spiecified
- Replies: 1
- Views: 1530
EF Core Model (code first) - mapping string to varchar with length spiecified
Hi,
i have problem with mapping string from model to database. When database is created string are always mapped to longtext. When i set default length in model setting then all string are mapped to varchar(default length). How can i change it? Even if i set validate max length to let say 50 it is always mapped to longtext or varchar with default length. Any idea how to fix it?
Best regards
i have problem with mapping string from model to database. When database is created string are always mapped to longtext. When i set default length in model setting then all string are mapped to varchar(default length). How can i change it? Even if i set validate max length to let say 50 it is always mapped to longtext or varchar with default length. Any idea how to fix it?
Best regards