EF5 Fluent API byte array to long
问题 Using EF5 Fluent API does anyone know if it's possible to have a binary column in the database but a long in the C#? When we put a long in the entity we always end up with EF errors at runtime (unable to perform the mapping). If we put a byte[] then everything works (binary in db usually means byte[] type in .NET code). We can't change database column type so it's not a solution. Here is what we end up doing : from l in LeadDataRepository.GetAll() select new { // we need an anonymous type