Enum datatypes

Enum datatypes

Postby turtlevet@gmail.com » Thu 27 Jun 2013 16:55

Hello,
in my model I have something like Status defined as AppointmentStatus datatype and mapped to a SQLite appointment.status field defines as smallint.
When I assign status = AppointmentStatus.Scheduled and then post to the database I get:

A first chance exception of type 'System.InvalidCastException' occurred in mscorlib.dll
Invalid cast from 'System.Int16' to 'BonfiSoft.VCL.Data.AppointmentStatus'.

if I change the type in the entity model to int and assign status = (int)AppointmentStatus.Scheduled it works

Any help would be appreciated

V/r

Alberto
turtlevet@gmail.com
 
Posts: 15
Joined: Fri 07 Jun 2013 19:41

Re: Enum datatypes

Postby MariiaI » Mon 01 Jul 2013 15:16

We couldn't reproduce this behavior with the latest build of LinqConnect 4.2.272. We are sending you a sample project to the e-mail address you have provided in your forum profile. Please check that the letter is not blocked by your mail filter.
Please make changes to it so that the issue could be reproduced and send it back to us or send us your project.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17


Return to LinqConnect (LINQ to SQL support)