Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • ThomasBrunbjerg 90 posts 182 karma points
    Sep 08, 2017 @ 07:59
    ThomasBrunbjerg
    0

    UIOMatic - "Exception has been thrown by the target of an invocation."

    I am using UI-o-Matic to have a CRUD view for a table in my SQL DB in my Umbraco Backoffice.

    This is the table in my DB: https://i.imgur.com/caQLQyU.png

    Currently I only want to show 3 column in the CRUD, which I have specified in my model class here:

    [UIOMatic("booking", "Bookinger", "Booking", FolderIcon = "icon-calendar-alt", ItemIcon = "icon-sunny")]
        [TableName("dbo.Booking")]
        public class Booking
        {
            [PrimaryKeyColumn(AutoIncrement = true)]
            public int BookingId { get; set; }
    
            [Required]
            [UIOMaticField(Name = "Navn", Description = "")]
            public string Navn { get; set; }
    
            [Required]
            [UIOMaticField(Name = "Addresse", Description = "")]
            public string Addresse { get; set; }
    
            [UIOMaticField(Description = "Example checkbox property",
                View = UIOMatic.Constants.FieldEditors.CheckBox)]
            public bool Godkendt { get; set; }
        }
    

    I am getting a 404 error when i select any of my items in the dashboard as well as this error: https://i.imgur.com/y3nmmft.png

    What am I doing wrong here?

  • ThomasBrunbjerg 90 posts 182 karma points
    Sep 08, 2017 @ 08:02
    ThomasBrunbjerg
    0

    Nevermind, I had to change my BookingId, to Id both in the database and in the model.

Please Sign in or register to post replies

Write your reply to:

Draft