I'm using ED for EF Core Version (6.2.439) (just bought a license last week) and VS 2017.
My questions:
1) If I create a new model in VS 2017 with Add New Item -> Devart EF Core Model -> Database First: There is no way to enter name for created model file? It is always called as DB Name: "DatabaseNameModel.cs". I think in EF 6 there is a way to name Model...
2) I started to experiment with EF Core Template. If I add a StoredProdcedure, generated Code for DbParams always adds .Size = -1 and precision and scale are ignored completly. But that is not good for nvarchars, decimal... So I experimented with the method "GenerateContextDirectCallMethod" in the template and there are indeed properties on your "EntityParameter". But these poperties gets not filled from Stored Procedure Params? Why is this so? And why there is no way in Designer to change size, precision and scale for Params?
3) I have a sp like this:
Code: Select all
ALTER PROCEDURE [Seek_ContainerBeweg]
@Identnummer nvarchar(16),
@KundenNr nvarchar(10),
@Abteilung nvarchar(10),
@Container nvarchar(10),
@Eingang bit,
@Ausgang bit,
@Nummer sql_variant,
@Datum numeric(8,0)
Code: Select all
public void SeekContainerBeweg (string Identnummer, string KundenNr, string Abteilung, string Container, System.Nullable<bool> Eingang, System.Nullable<bool> Ausgang, string Nummer, System.Nullable<decimal> Datum)
And the command params get generated like this:
Code: Select all
DbParameter NummerParameter = cmd.CreateParameter();
NummerParameter.ParameterName = "Nummer";
NummerParameter.Direction = ParameterDirection.Input;
if (Nummer != null)
{
NummerParameter.Value = Nummer;
}
else
{
NummerParameter.DbType = DbType.String;
NummerParameter.Size = -1;
NummerParameter.Value = DBNull.Value;
}
cmd.Parameters.Add(NummerParameter);
DbParameter DatumParameter = cmd.CreateParameter();
DatumParameter.ParameterName = "Datum";
DatumParameter.Direction = ParameterDirection.Input;
if (Datum.HasValue)
{
DatumParameter.Value = Datum.Value;
}
else
{
DatumParameter.DbType = DbType.Decimal;
DatumParameter.Size = -1;
DatumParameter.Value = DBNull.Value;
}
cmd.Parameters.Add(DatumParameter);
cmd.ExecuteNonQuery();
Param "Nummer": ServerDataType, Length were changed.
Param "Datum": ServerDataType, Precision, Scale were changed.
4) In Visual Studio 2017, if I open the template file in editor: I can search for text like "param", but if I click "Find next" nothing happens. Although there are many other "param" in the text. This only happens in your template file
5) In ED I can search for "param" and I will find them all, good. But how can I access command with shortcuts? Even copy and past is not working with CTRL-C or CTRL-V? Is this normal?