0

I have a windows service, in C#, that is using Telerik Open Access. When I call the following code (query), I get the error below.
Code

                    var updateRecords =
                        _context.Contracts.First(
                            s => s.ContractId == model.ContractId);

Error

Mapping for class 'Store.Data.User' is specified in file 'config' but the class could not be found. --> StoreModel/namespace[Store.Data]/class[User]

I suspect the error is not related to the query itself, but with the repository/OpenAccess configuration.

Does anyone have an insight into this?

Thanks!

user3524244
  • 43
  • 1
  • 5
  • The error appears when User is available in the mapping configuration of your data access layer, but in fact its code is missing from the compiled assembly. Do you use the Classic mapping approach of OpenAccess ORM or the contemporary? If you are using the contemporary approach, do you have an .rlinq file or a fluent model? If you are using an .rlinq file, does the error re-appear after you open it in [Visual Designer](http://docs.telerik.com/data-access/feature-reference/tools/visual-designer/developemnt-environment-wizards-dialogs-model-tools-designer-designer) and save it (Ctrl + S)? – Doroteya Agayna Feb 05 '15 at 07:05
  • Thanks Doroteya! I think you pointed us in the right direction! – user3524244 Feb 05 '15 at 18:16

1 Answers1

0

In my case, I was missing the Telerik.OpenAccess.Runtime reference

seabass2020
  • 1,093
  • 14
  • 12