Quantcast
Channel: EntityFramework Reverse POCO Code First Generator
Viewing all articles
Browse latest Browse all 1642

Created Unassigned: Bug when view contains period character? [163]

$
0
0
Hi there.

I have a view name EGData.Bolig.CreditorOpenInvoices

I have tried using renaming to fix namespace related issues.

TableRename = (name, schema) =>
{
return name.Replace(".Bolig.", "");
};


When querying through ef I get an error in the code (when calling ToTable method) generated by EF Poco Generator:
internal class EgDataCreditorOpenInvoicesConfiguration : EntityTypeConfiguration<EgDataCreditorOpenInvoices>
{
public EgDataCreditorOpenInvoicesConfiguration()
: this("dbo")
{
}

public EgDataCreditorOpenInvoicesConfiguration(string schema)
{
ToTable(schema + ".EGData.Bolig.CreditorOpenInvoices"); // EXCEPTION HERE
HasKey(x => x.CreditorNumber);

Property(x => x.CreditorNumber).HasColumnName("CreditorNumber").IsRequired().HasColumnType("decimal");
Property(x => x.Company).HasColumnName("Company").IsOptional().HasColumnType("smallint");
Property(x => x.Department).HasColumnName("Department").IsOptional().HasColumnType("smallint");
Property(x => x.DueDate).HasColumnName("DueDate").IsOptional().HasColumnType("datetime");
Property(x => x.Sum).HasColumnName("Sum").IsOptional().HasColumnType("money").HasPrecision(19,4);
Property(x => x.Deposit).HasColumnName("Deposit").IsOptional().HasColumnType("money").HasPrecision(19,4);
Property(x => x.CreditorPaymentId).HasColumnName("CreditorPaymentId").IsOptional().IsUnicode(false).HasColumnType("varchar").HasMaxLength(24);
}
}


An exception of type 'System.ArgumentException' occurred in EntityFramework.dll but was not handled in user code
Additional information: The database name 'dbo.EGData.Bolig.CreditorOpenInvoices' is invalid. Database names must be of the form [<schema_name>.]<object_name>.


Any thoughts are appreciated :-)


Viewing all articles
Browse latest Browse all 1642

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>