radzenhq / radzen-blazor-studio

Sample applications created with Radzen Blazor Studio
https://www.radzen.com/blazor-studio
18 stars 3 forks source link

The argument 'name' cannot be null #110

Closed programmiererei closed 1 year ago

programmiererei commented 1 year ago

Error with my first page in Radzen-Blazor-Studio: I have no idee where to look for error. Parallel I generated the page with Radzen (Blazor Server): There is no problem.

MSSQL-Database, Table with 3 columns, Page with DataGrid with Inline-Edit:

[Table("tblLagerstellen", Schema = "dbo")]
public partial class TblLagerstellen
{
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public int LS_ID { get; set; }

    [Required]
    public string Lagerstelle { get; set; }

    public bool AutomatischerImport { get; set; }

    public ICollection<TblDepot> TblDepots { get; set; }

    public ICollection<TblEbenen> TblEbenens { get; set; }

    public ICollection<TblImportDateien> TblImportDateiens { get; set; }

    public ICollection<TbllandesbankLagerstelleRegexp> TbllandesbankLagerstelleRegexps { get; set; }

    public ICollection<TblmarktLagerstelleRegexp> TblmarktLagerstelleRegexps { get; set; }

    public ICollection<TblproduktLagerstelleRegexp> TblproduktLagerstelleRegexps { get; set; }

    public ICollection<TblRechnungen> TblRechnungens { get; set; }

}

Produces following error:

An unhandled exception occurred while processing the request. ArgumentException: The argument 'name' cannot be null, empty or contain only whitespace. (Parameter 'name') System.ComponentModel.DataAnnotations.Schema.ColumnAttribute..ctor(string name)

Stack Query Cookies Headers Routing ArgumentException: The argument 'name' cannot be null, empty or contain only whitespace. (Parameter 'name') System.ComponentModel.DataAnnotations.Schema.ColumnAttribute..ctor(string name) System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, RuntimeType type, IRuntimeMethodInfo pCtor, Byte* ppBlob, Byte pEndBlob, Int32* pcNamedArgs) System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, RuntimeType type, IRuntimeMethodInfo ctor, ref IntPtr blob, IntPtr blobEnd, out int namedArgs) System.Reflection.CustomAttribute.AddCustomAttributes(ref ListBuilder attributes, RuntimeModule decoratedModule, int decoratedMetadataToken, RuntimeType attributeFilterType, bool mustBeInheritable, ListBuilder derivedAttributes) System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, int decoratedMetadataToken, int pcaCount, RuntimeType attributeFilterType) System.Reflection.RuntimePropertyInfo.GetCustomAttributes(Type attributeType, bool inherit) System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, bool inherit) System.Attribute.GetCustomAttributes(MemberInfo element, Type attributeType, bool inherit) System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType, bool inherit) System.Reflection.CustomAttributeExtensions.GetCustomAttribute(MemberInfo element, bool inherit)

Thanks, Ralf

akorchev commented 1 year ago

Hi @programmiererei,

This is probably related to the database schema. You can send an SQL script with it to info@radzen.com

akorchev commented 1 year ago

Closing the issue as no further information was provided.