MetadataException Pls Help

2 posts, 0 answers
  1. Cuneyt
    Cuneyt avatar
    36 posts
    Member since:
    Dec 2011

    Posted 02 Sep 2013 Link to this post

    I dont have any idea about exception. Pls help.
    I have table with sqltype geography. and i create a web api service with openacess wizard from this table. but if i try to use web service application give me this error.
    İ need help.

    Error text:
    MetadataException was unhandled by user code
    No database type mapping found for the field '<value>': CLR type 'Application.OpenAccess.Traffic' or column type " unmapped.

    Thanks.
  2. Dimitar Tachev
    Admin
    Dimitar Tachev avatar
    67 posts

    Posted 05 Sep 2013 Link to this post

    Hello Cuneyt,

     
    In order to use the Geography data from your tables properly I suggest you follow the steps described in our How to: Work with Special Data documentation section.

    You could find an example of our Special Data support at the Basic Special Data with OpenAccess ORM example in the WPF section of our Sample Kit. Also you could take a look at this blog post demonstrating how to integrate an OpenAccess ORM model containing Special Data with the WPF RadMap.

    Please bear in mind that if you don't include your Geometry property in the fetch strategy of the context instance of the repository for your Special Data tables, you will get a Null value after detaching the entities.
    For example if you need to get the Geometry property of the Location entity from our Basic Special Data with OpenAccess ORM example using Web API service you will need to add the following code in its repository - please find an example result of the service call in the attached image:

    public partial class LocationRepository :
    OpenAccessBaseRepository<Location, TestDBEntityDiagrams>
    {
        public override IQueryable<Location> GetAll()
        {
            this.fetchStrategy.LoadWith<Location>(l => l.GeoLocation);
     
            return base.GetAll();
        }
    }

    If you still experience the same issues after applying these steps, could you please provide us with more details about the steps for reproducing this issue. Also a sample application demonstrating the problematic behavior will be highly appreciated.

    I am looking forward to your feedback.

    Regards,
    Dimitar Tachev
    Telerik
    OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvements shipped with this release.
  3. DevCraft banner
Back to Top