0

I am trying to add a employee details in database table but I am Getting this error

 **Argument 1: cannot convert from 'MVCCRUDOPERTIONS.Models.DATABASE.emoloyee' to 'MVCCRUDOPERTIONS.Models.DATABASE.employee' MVCCRUDOPERTIONS C:\Users\user\source\repos\MVCCRUDOPERTIONS\MVCCRUDOPERTIONS\ViewModels\HOME\EmployeeViewModel.cs 26 Active**

since I am new in asp.net I am unable to sort this on my own.any help would be appreciated.

theCoder
  • 731
  • 3
  • 11
  • 19
  • 1
    emoloyee? At least fix the typo. – Siderite Zackwehdex Jul 09 '19 at 19:49
  • now I am getting this error 'Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.' – theCoder Jul 09 '19 at 20:01
  • @theCoder Refer to this link for your above error: https://stackoverflow.com/questions/7795300/validation-failed-for-one-or-more-entities-see-entityvalidationerrors-propert and also it would be great if you can show how you are adding your data to your database. – Rahul Sharma Jul 09 '19 at 22:33

1 Answers1

1

emoloyee and employee are two different classes

OrElse
  • 9,709
  • 39
  • 140
  • 253
  • now I am getting this error 'Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.' – theCoder Jul 09 '19 at 20:01
  • @theCoder Did you see EntityValidationErrors property for more details? What did it say? – mason Jul 09 '19 at 20:07