{"message":"Erro: The cast to value type 'SivaNFeBusiness.Util.EnumHelper+ZipGenerationFrequence' failed because the materialized value is null. Either the result type's generic parameter or the query must use a nullable type.","exception":{"ClassName":"System.InvalidOperationException","Message":"The cast to value type 'SivaNFeBusiness.Util.EnumHelper+ZipGenerationFrequence' failed because the materialized value is null. Either the result type's generic parameter or the query must use a nullable type.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at System.Data.Entity.Core.Common.Internal.Materialization.Shaper.ErrorHandlingValueReader`1.GetValue(DbDataReader reader, Int32 ordinal)\r\n at lambda_method(Closure , Shaper )\r\n at System.Data.Entity.Core.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)\r\n at System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()\r\n at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n at SivaNFeBusiness.EnterpriseBusiness.GetEnterprisesToBackup(DateTime dataIni) in C:\\Users\\guilherme\\Documents\\Desenvolvimento\\UUUUUUU\\Postgres\\sivanfe\\SivaNFeBusiness\\EnterpriseBusiness.cs:line 39\r\n at SivaNFeService.GenerateZipXml.GenerateZip(DateTime dataIni, DateTime dataFim, Boolean retroativo, String cnpj) in C:\\Users\\guilherme\\Documents\\Desenvolvimento\\UUUUUUU\\Postgres\\sivanfe\\SivaNFeWCF\\GenerateZipXml.ashx.cs:line 118\r\n at SivaNFeService.GenerateZipXml.ProcessRequest(HttpContext context) in C:\\Users\\guilherme\\Documents\\Desenvolvimento\\UUUUUUU\\Postgres\\sivanfe\\SivaNFeWCF\\GenerateZipXml.ashx.cs:line 33","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nGetValue\nEntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Data.Entity.Core.Common.Internal.Materialization.Shaper+ErrorHandlingValueReader`1\nT GetValue(System.Data.Common.DbDataReader, Int32)","HResult":-2146233079,"Source":"EntityFramework","WatsonBuckets":null}}