Cannot create an instance of an interface

Hi @odinserj - Ok I think I see what you are saying about passing cars entity - so currently running this code:

BackgroundJob.Enqueue<MyImportService>(x => x.AddCar(cars)); 

On my HangFire dashboard - I get the following

Failed An exception occured during arguments deserialization. 
 
System.NotSupportedException

CollectionConverter cannot convert from System.String.
System.NotSupportedException: CollectionConverter cannot convert from System.String.
   at System.ComponentModel.TypeConverter.GetConvertFromException(Object value)
   at System.ComponentModel.TypeConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   at System.ComponentModel.TypeConverter.ConvertFromInvariantString(String text)
   at HangFire.Common.Job.DeserializeArguments()

So I take it HangFire cannot Deserialize my cars object - from Reading your BlogPost I should write a custom TypeConverter for cars object correct?

What I am not sure of is where this TypeConvert should ‘live’ in my code base? As part of HangFireConfig,cs?

Best solution for this for anyone reading is to create a wrapper entity class which has List of your Entitys and a single ID which you can pass in the ID of the wrapper entity class

Thanks