3

I'm working for the first time on a asp.net web api 2 project and I'm having problems creating controllers.

I'm using Code first from existing DB (mysql) with EF 6.

I am able to generate my model and all, but when I try to create a controller I get the following error (for all classes):

There is no store type corresponding to the conceptual side type 'Sbyte' of primitive type 'Sbyte'add controller error

I tried changing the properties that are typed SByte to int, and I also changed the model builder:

modelBuilder.Entity<consultants>().Property(e => e.interne).      HasColumnType("utinyint");

P.s: I made sure to rebuild my project still not working

Elydasian
  • 2,016
  • 5
  • 23
  • 41
  • What do you mean by creating a Controller? right clicking the project and select Add -> Controller? – joaoruimartins Feb 09 '16 at 14:05
  • that's not what i meant... after i do that (right click->add->controller->web api 2 ODatav3 controller using entityframwork) and i define model class and context class, i click "add" and get this error – Sami Errougui Feb 09 '16 at 15:49
  • Sounds like a scaffolding issue. Try some of the solutions here: http://stackoverflow.com/questions/23910162/scaffolding-controller-doesnt-work-with-visual-studio-2013-update-2 – Steve Greene Feb 09 '16 at 16:15

0 Answers0