Search found 25 matches

by mrmiagi0101
Thu 06 Oct 2022 07:00
Forum: Entity Developer
Topic: SQL Server column default value
Replies: 3
Views: 25692

Re: SQL Server column default value

Any update for this?
by mrmiagi0101
Wed 06 Apr 2022 08:43
Forum: Entity Developer
Topic: Visual Studio 2022
Replies: 29
Views: 1088615

Re: Visual Studio 2022

Hello Devart,

can you please provide a statement, if there is current develpment regarding EntityDeveloper? Or is the development stopped because of the war in the ukrain?

I searched via google and found out that your developement team is based in Kharkiv, is this correct?
We realy need an update on this topic.
by mrmiagi0101
Fri 26 Nov 2021 07:53
Forum: Entity Developer
Topic: EF Core3 : One to one relation multiplicity suddenly changes
Replies: 5
Views: 28326

EF Core3 : One to one relation multiplicity suddenly changes

Hello again,

we found another BUG with one to one relations. Again EF Core 3.1, ED 6.12.1354, MS SQL Server with Database First.
We have a one to one relation with two tables, where FK = PK in dependent table. The problem is every time we open the designer, it changes the multiplicity automatically from 'one to one' to 'zero or one to one' and back again.

Just added the two tables and saved, we have 0..1 -----> 1:
(By the way here the 0..1 multiplicity is on the wrong side. I already mentioned it in another thread):
Image
Image

Close the designer and open it again, we suddenly have 1 -----> 1 (Nothing is changed from our side!):
Image
Image

If we open again later, it switches back to 0..1 -----> 1 and so on.

Can you fix this please.
by mrmiagi0101
Thu 25 Nov 2021 20:23
Forum: Entity Developer
Topic: SQL Server column default value
Replies: 3
Views: 25692

SQL Server column default value

Hello,

we are using MS SQL Server and EF Core 3(.1) and ED 6.12.1354.

If a column has a default value in database not matching the type of column, this is not a problem for SQL Server.
E.g. colum is nvarchar(16) and default value is 0 (integer), not '0' (nvarchar). If inserting a new row, the value for that column is set to '0'.

But ED creates that config line with 'ValueGeneratedOnAdd' instead of 'ValueGeneratedNever':
HasColumnType(@"nvarchar(16)").ValueGeneratedOnAdd().HasMaxLength(16).HasDefaultValueSql(@"0");
And does not set the property in code to "0".
I guess this is happening because of differnet types?

Is it possible to have the poperty set to the (converted) default value in the autogenerated code of the entity constructor to get rid of the ValueGeneratedOnAdd?
by mrmiagi0101
Thu 25 Nov 2021 16:49
Forum: Entity Developer
Topic: EF Core3 : One to one relation multiplicity wrong
Replies: 3
Views: 25474

EF Core3 : One to one relation multiplicity wrong

Hello,

I don't understand yor multiplicity in EF Core for one to one relations. For me it looks like they are on the wrong end in the designer. We are using ED 6.12.1354 with MS SQL Database.

We have two Tables 'WithTwoKeyFields' and 'RequiredOneToOne' table.
WithTwoKeyFields table is the principial of the relation and has just two columns as PK:
Image

'RequiredOneToOne' table has its own primary key and the two not nullable FK columns referencing to the PK columns of the WithTwoKeyFields table:
Image

So, a WithTwoKeyField row can have 0..1 RequiredOneToOne rows referenced.
A RequiredOneToOne always needs/has 1 WithTwoKeyField referenced.

So UML Multiplicity is WithTwoKeyField 1..1 -------> 0..1 RequiredOneToOne.

But the Designer shows it the other way around! This seems wrong to me:
Image

Can you explain this?
by mrmiagi0101
Fri 22 Oct 2021 09:54
Forum: Entity Developer
Topic: Windows 10 Update KB 5006670 is breaking Entity Developer
Replies: 10
Views: 17710

Re: Windows 10 Update KB 5006670 is breaking Entity Developer

I can confirm, with the last ED Version, the Visual Studio integration and the Standalone ED are running again even with the Windows Update installed.

Good job Devart!
by mrmiagi0101
Thu 14 Oct 2021 10:09
Forum: Entity Developer
Topic: Windows 10 Update KB 5006670 is breaking Entity Developer
Replies: 10
Views: 17710

Windows 10 Update KB 5006670 is breaking Entity Developer

The latest MS Windows 10 Securitry Update causes Entity Developer to stop working!

KB5006670

@Devart you have to fix this soon. Nobody can work anymore with ED.
by mrmiagi0101
Thu 14 Oct 2021 09:36
Forum: Entity Developer
Topic: Cannot open any models in Entity Developer
Replies: 6
Views: 15210

Re: Cannot open any models in Entity Developer

Yes same here. Complete company can not work with ED at he moment! Even Standalone ED can not be opened anymore.
Maybe something with Windows 10 Updates? There is a CrashReport Window, but it is hidden and I can not bring it to front. Somehow your Splash Screen is hiding that!

Got the Report Window in front of SplashScreen and sent the report to you:

This is the error:
=========================
General
=========================
Application: Entity Developer
Product: Entity Developer
Product Locale: English
Assembly: EntityDeveloper, Version=6.12.1338.0, Culture=neutral, PublicKeyToken=09af7300eec23701
C:\Program Files (x86)\Devart\EntityDeveloper\EntityDeveloper.exe
Global cache: False
Framework: 4.0.30319.42000

=========================
Exception Information
=========================
Message: Ein Aufrufziel hat einen Ausnahmefehler verursacht.
Source: mscorlib
TargetSite: System.Object CreateInstance(System.RuntimeType, Boolean, Boolean, Boolean ByRef, System.RuntimeMethodHandleInternal ByRef, Boolean ByRef)
HelpLink:
Type: System.Reflection.TargetInvocationException
Stack:
bei System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
bei System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
bei System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
bei System.Activator.CreateInstance[T]()
bei EntityDeveloper.NetShell.EntityDeveloperModule.ToolWindowCreatableControl`1.a2()
bei EntityDeveloper.NetShell.EntityDeveloperModule.CreateToolWindowControl(Guid windowId)
bei Devart.Shell.Studio.StudioToolWindow.CreateHostedControl()

Message: Ein Element mit dem gleichen Schlüssel wurde bereits hinzugefügt.
Source: mscorlib
TargetSite: Void ThrowArgumentException(System.ExceptionResource)
HelpLink:
Type: System.ArgumentException
Stack:
bei System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
bei System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
bei System.Collections.ObjectModel.KeyedCollection`2.AddKey(TKey key, TItem item)
bei System.Collections.ObjectModel.KeyedCollection`2.InsertItem(Int32 index, TItem item)
bei System.Collections.ObjectModel.Collection`1.Add(T item)
bei Devart.Diagram.DiagramPalette.GetCenterPen(Color color, Dimension width)
bei Devart.Diagram.DiagramPalette..ctor(ViewService viewService)
bei Devart.Diagram.ViewService..ctor(DiagramOptions options)
bei Devart.Diagram.Diagram..ctor(String diagramTypeId, IServiceProvider parentProvider)
bei Devart.Diagram.Overview.OverviewAddIn..ctor()
bei EntityDeveloper.bp..ctor()

=========================
Window Layout
=========================
Active document window: 'Start Page' (tabbed toolwindow)
No documents

Toolwindows (visible or have been shown in current session):
Caption: 'Model Explorer', Visible: 'True', DefaultVisibility: 'Always', IsControlCreated: 'True', State: Docked
Caption: 'Start Page', Visible: 'True', DefaultVisibility: 'Always', IsControlCreated: 'True', State: Tabbed
Caption: 'Properties', Visible: 'True', DefaultVisibility: 'Always', IsControlCreated: 'True', State: Docked
Caption: 'Database Explorer', Visible: 'True', DefaultVisibility: 'Always', IsControlCreated: 'True', State: Docked
Caption: 'Diagram Overview', Visible: 'True', DefaultVisibility: 'Always', IsControlCreated: 'False', State: Docked
Caption: 'Error List', Visible: 'True', DefaultVisibility: 'Always', IsControlCreated: 'False', State: Docked

=========================
Loaded Assemblies
=========================
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 4.0.0.0 C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
EntityDeveloper, Version=6.12.1338.0, Culture=neutral, PublicKeyToken=09af7300eec23701 6.12.1338.0 C:/Program Files (x86)/Devart/EntityDeveloper/EntityDeveloper.exe
System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 4.0.0.0 C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 4.0.0.0 C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
EntityDeveloper.Common, Version=6.12.1338.0, Culture=neutral, PublicKeyToken=09af7300eec23701 6.12.1338.0 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/NET4/EntityDeveloper.Common.dll
Devart.Shell.Interfaces.ED, Version=1.4.20.1, Culture=neutral, PublicKeyToken=09af7300eec23701 1.4.20.1 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/Devart.Shell.Interfaces.ED.dll
System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 4.0.0.0 C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
EntityDeveloper.Orm.Common, Version=6.12.1338.0, Culture=neutral, PublicKeyToken=09af7300eec23701 6.12.1338.0 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/NET4/EntityDeveloper.Orm.Common.dll
System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 4.0.0.0 C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 4.0.0.0 C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
EntityDeveloper.Orm.EntityFramework, Version=6.12.1338.0, Culture=neutral, PublicKeyToken=09af7300eec23701 6.12.1338.0 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/NET4/EntityDeveloper.Orm.EntityFramework.DLL
EntityDeveloper.Orm.EntityFrameworkCore, Version=6.12.1338.0, Culture=neutral, PublicKeyToken=09af7300eec23701 6.12.1338.0 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/NET4/EntityDeveloper.Orm.EntityFrameworkCore.DLL
Devart.Shell.Studio.ED, Version=1.4.20.1, Culture=neutral, PublicKeyToken=09af7300eec23701 1.4.20.1 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/Devart.Shell.Studio.ED.dll
Devart.Shell.Utils.ED, Version=1.4.20.1, Culture=neutral, PublicKeyToken=09af7300eec23701 1.4.20.1 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/Devart.Shell.Utils.ED.dll
System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 4.0.0.0 C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
Devart.Shell.CommonRes.ED, Version=1.4.20.1, Culture=neutral, PublicKeyToken=09af7300eec23701 1.4.20.1 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/Devart.Shell.CommonRes.ED.DLL
Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 4.0.0.0 C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
Devart.XBars.v9.3, Version=9.3.11.1, Culture=neutral, PublicKeyToken=09af7300eec23701 9.3.11.1 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/Devart.XBars.v9.3.DLL
Devart.XEditors.v9.3, Version=9.3.11.1, Culture=neutral, PublicKeyToken=09af7300eec23701 9.3.11.1 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/Devart.XEditors.v9.3.DLL
Devart.XData.v9.3, Version=9.3.11.1, Culture=neutral, PublicKeyToken=09af7300eec23701 9.3.11.1 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/Devart.XData.v9.3.DLL
Devart.XUtils.v9.3, Version=9.3.11.1, Culture=neutral, PublicKeyToken=09af7300eec23701 9.3.11.1 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/Devart.XUtils.v9.3.DLL
Devart.Shell.Controls.ED, Version=1.4.20.1, Culture=neutral, PublicKeyToken=09af7300eec23701 1.4.20.1 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/Devart.Shell.Controls.ED.DLL
mscorlib.resources, Version=4.0.0.0, Culture=de, PublicKeyToken=b77a5c561934e089 4.0.0.0 C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_de_b77a5c561934e089/mscorlib.resources.dll
System.Windows.Forms.resources, Version=4.0.0.0, Culture=de, PublicKeyToken=b77a5c561934e089 4.0.0.0 C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll
System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 4.0.0.0 C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
Devart.Studio.Help.ED, Version=1.4.20.1, Culture=neutral, PublicKeyToken=09af7300eec23701 1.4.20.1 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/Devart.Studio.Help.ED.DLL
Devart.XTreeList.v9.3, Version=9.3.11.1, Culture=neutral, PublicKeyToken=09af7300eec23701 9.3.11.1 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/Devart.XTreeList.v9.3.dll
Devart.Diagram, Version=1.20.0.98, Culture=neutral, PublicKeyToken=09af7300eec23701 1.20.0.98 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/Devart.Diagram.dll
Devart.Ole.UndoManager, Version=1.0.878.0, Culture=neutral, PublicKeyToken=09af7300eec23701 1.0.878.0 C:/Program Files (x86)/Common Files/Devart/EntityDeveloper/Devart.Ole.UndoManager.DLL

=========================
System Information
=========================
Wow64 detected.
Processor architecture: amd64
Processor quantity: 16
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13
Intel(R) Xeon(R) E-2286M CPU @ 2.40GHz Intel64 Family 6 Model 158 Stepping 13

Total physical memory: 32521Mb
Available virtual memory: 19950Mb

Operating System Name: Windows 10 Enterprise
Operating System Version: Microsoft Windows NT 6.2.9200.0
UAC: Enabled
Elevation Level: Default

Instances: 1
Culture: German (Germany)
Process started at 10/14/2021 11:41:50
Report created at 10/14/2021 11:41:51
by mrmiagi0101
Wed 31 Mar 2021 14:25
Forum: Entity Developer
Topic: Custom tool error: bufferAdapter is not a VsTextDocData
Replies: 23
Views: 22523

Re: Custom tool error: bufferAdapter is not a VsTextDocData

Any news here?

Is it not possible for you to build in e.g. a save button directly in your editor or something like that?
by mrmiagi0101
Fri 19 Mar 2021 07:53
Forum: Entity Developer
Topic: Custom tool error: bufferAdapter is not a VsTextDocData
Replies: 23
Views: 22523

Re: Custom tool error: bufferAdapter is not a VsTextDocData

Ok, this is annoying.

We have this Problem in a .NET Standard 2.0 project. Does the problem also exist in .NET 5 and .NET Core projects?
Because we have tested it in a 4.7.2 .NET Framework project and there works everything fine.

Is there a open issue for the problem at Microsoft/Visual Studio site?
by mrmiagi0101
Wed 17 Mar 2021 07:54
Forum: Entity Developer
Topic: Custom tool error: bufferAdapter is not a VsTextDocData
Replies: 23
Views: 22523

Re: Custom tool error: bufferAdapter is not a VsTextDocData

Good morning,

this bug has to be fixed as soon as possible! We use ED in real production environment with 14 licenses/developer in Visual Studio 2019 and this is a no go.
Why do you not fix this problem? Using the standalone version is no option! Why are you not able to fix this in one month?
by mrmiagi0101
Fri 10 Jul 2020 11:16
Forum: Entity Developer
Topic: DbParameter.Size is wrong with MS Sql nvarchar/nchar
Replies: 2
Views: 5269

DbParameter.Size is wrong with MS Sql nvarchar/nchar

Hello,

there is a bug with creating of StoredPocedure parametes in EF Core.
I have this simple SP:
Create PROCEDURE [dbo].[Seek_ContainerBewegTest]
@Identnummer nvarchar(10),
@Identnummer2 varchar(10),
@Identnummer3 char(10),
@Identnummer4 nchar(10),
@identnummer5 ntext
AS
Select @Identnummer
GO

You can see everything has size 10, expect the last parameter.

1) If I create the methods with EntityDeveloper, the nvarchar(10) and nchar(10) prameter are created with size = 20! This is wrong. It should be the same as for varchar/char = 10:

Code: Select all

                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.CommandText = @"dbo.Seek_ContainerBewegTest";

                    DbParameter IdentnummerParameter = cmd.CreateParameter();
                    IdentnummerParameter.ParameterName = "Identnummer";
                    IdentnummerParameter.Direction = ParameterDirection.Input;
                    IdentnummerParameter.DbType = DbType.String;
                    IdentnummerParameter.Size = 20;
                    if (Identnummer != null)
                    {
                        IdentnummerParameter.Value = Identnummer;
                    }
                    else
                    {
                        IdentnummerParameter.Value = DBNull.Value;
                    }
                    cmd.Parameters.Add(IdentnummerParameter);

                    DbParameter Identnummer2Parameter = cmd.CreateParameter();
                    Identnummer2Parameter.ParameterName = "Identnummer2";
                    Identnummer2Parameter.Direction = ParameterDirection.Input;
                    Identnummer2Parameter.DbType = DbType.String;
                    Identnummer2Parameter.Size = 10;
                    if (Identnummer2 != null)
                    {
                        Identnummer2Parameter.Value = Identnummer2;
                    }
                    else
                    {
                        Identnummer2Parameter.Value = DBNull.Value;
                    }
                    cmd.Parameters.Add(Identnummer2Parameter);

                    DbParameter Identnummer3Parameter = cmd.CreateParameter();
                    Identnummer3Parameter.ParameterName = "Identnummer3";
                    Identnummer3Parameter.Direction = ParameterDirection.Input;
                    Identnummer3Parameter.DbType = DbType.String;
                    Identnummer3Parameter.Size = 10;
                    if (Identnummer3 != null)
                    {
                        Identnummer3Parameter.Value = Identnummer3;
                    }
                    else
                    {
                        Identnummer3Parameter.Value = DBNull.Value;
                    }
                    cmd.Parameters.Add(Identnummer3Parameter);

                    DbParameter Identnummer4Parameter = cmd.CreateParameter();
                    Identnummer4Parameter.ParameterName = "Identnummer4";
                    Identnummer4Parameter.Direction = ParameterDirection.Input;
                    Identnummer4Parameter.DbType = DbType.String;
                    Identnummer4Parameter.Size = 20;
                    if (Identnummer4 != null)
                    {
                        Identnummer4Parameter.Value = Identnummer4;
                    }
                    else
                    {
                        Identnummer4Parameter.Value = DBNull.Value;
                    }
                    cmd.Parameters.Add(Identnummer4Parameter);

                    DbParameter identnummer5Parameter = cmd.CreateParameter();
                    identnummer5Parameter.ParameterName = "identnummer5";
                    identnummer5Parameter.Direction = ParameterDirection.Input;
                    identnummer5Parameter.DbType = DbType.String;
                    identnummer5Parameter.Size = 2147483647;
                    if (identnummer5 != null)
                    {
                        identnummer5Parameter.Value = identnummer5;
                    }
                    else
                    {
                        identnummer5Parameter.Value = DBNull.Value;
                    }
                    cmd.Parameters.Add(identnummer5Parameter);
2) The method Designer has also a bug: The ntext param Size is not refreshed in Desginer. It is always the size of the last selected param. If you open the settings of the method and switch to parameter tab. The first parameter (Identnummer) is selected showing the wrong size 20. If you now switch to the last (ntext) parameter, it also shows 20! If you now switch to the second param, it shows the 10. If you now switch back to the last parameter (ntext) it shows also 10!
by mrmiagi0101
Mon 06 Jul 2020 19:59
Forum: Entity Developer
Topic: EF Core 3.1 Template - Determine if EntityClass is SQL view or table
Replies: 3
Views: 7376

Re: EF Core 3.1 Template - Determine if EntityClass is SQL view or table

a) + b) I only need this for replacing your logic for creating the entity configuration. Because you always use ToView if QueryType = true. But this is wrong, If you have a table, you should really use ToTable with HasNoKey instead. Because we use Ef Cores buildin "DbContext.Database.EnsureCreated()" methods for testing our own framework based on EF Core. So EF Core creates the tables from the applied entity configurations of a DBContext in our integrationTests. But if there is ToView used, it ignores that object and is not generating the tables.

See this on Ef Core documentation:
"Note
ToView assumes that the object already exists in the database and it won't be created by migrations."

https://docs.microsoft.com/en-us/ef/cor ... nnotations

So I wanted to change this in the Template, but I realized there is no way to find out what we really have (Table or View) in template.
And the second thing was to apply different default colors as I mentioned.

I have another new reqiurement, but It look like it is also missing in the tamplate. I would need to get the complete sql definition of a stored procedure of function. I think you already fetch this from the sql object, but you do not pass this info to template. Or is there a way to see the sql of it? My goal is to get the info if a sql parameter has a default value or not.