I got the following error in production Value cannot be null. (Parameter 'source')
My enum values are
public enum Offer{ None=1, all, stop,}
Class Emp{[Column(TypeName = "jsonb")] public list<Offer> offer { get; set; } public D d { get; set } public string FullName { get; set } } class D { public string age { get; set } public string countryCode { get; set } }
public async Task<List<Emp>> ListEmp( List<Offer> offer ){var query= catalogDb.Emp.Include(a=>a.D) .Where(a=>a.Name="xyz") .AsQueryable();}if(offer.Count>0){ var result=query.AsEnumerable() .Where(y => y.Offers.Any(z => offer.Contains(z))) .ToList(); return result; }
return await query.ToListAsync();
}
when I run dotnet publish and dotnet publish -c Release -o out then i run dotnet out/Emp.dll
then i got
Unhandled exception. System.ArgumentNullException: String reference not set to an instance of a String. (Parameter 's')
at System.Text.Encoding.GetBytes(String s)
could you pleas help me to solved this