Custom AutoCrud Update

Hi, i trying to do some custom behaviour on an AutoCrud update.
Basically my request dto has an additional Items property which is not present on the destination Record Bag…

 public class UpdateBag : UpdateAuditBase<Bag, UpdateBagResponse>
    {
        public int Id { get; set; }
        
        public string Name { get; set; }
        
        public string Title { get; set; }
        
        public string Note { get; set; } 
  
        public List<UpdateBagItem> Items { get; set; } = new List<UpdateBagItem>();
        
        public BagStatus Status { get; set; }
    }

On the custom implementation i’m just using UpdateAsync(updateBag, Request) but i get an exception 'Items' is not a property of 'Bag' .

The same code works for the Create Request.

You can use the [AutoIgnore] Attribute or ignore the properties globally by adding it to AutoQuery.IncludeCrudProperties. I’ve added some docs with examples. The [AutoIgnore] attribute requires the latest v5.9.2 NuGet release.

1 Like

Thanks it works, i tried AutoIgnore but i was on 5.9.0 it works fine on 5.9.2

1 Like