Informations about Database.Get

4 posts, 0 answers
  1. Wolfgang
    Wolfgang avatar
    98 posts
    Member since:
    Oct 2012

    Posted 25 Oct 2012 Link to this post

    Hi,

    where can i find the informations for Database.Get? I'm interessted in values for configOverride, especially how to give a Port for a database.

    Thx in advance
  2. Ralph Waldenmaier
    Admin
    Ralph Waldenmaier avatar
    202 posts

    Posted 26 Oct 2012 Link to this post

    Hi Wolfgang,

    I am not quite sure why you want to work with the Database object itself. 
    The best way to specify a port for a database in my opinion is to provide this information within your connection string. There you are able to specify whatever is supported by the respective database.
    See this link for details how to do this. 
    When working with the Context, there is also no need to use this method. You can override the OnDatabaseOpen method to tweak the BackendConfiguration and/or the MetaDataContainer in the way that fits your purpose.
    Nevertheless, if you want to use the old approach you can use the Database.Get method as well. See this documentation for details. Regarding the valid values there, you might find this link useful.

    I hope this information is helpful for you.
    Do come back if you need further assistance.

    Kind regards,
    Ralph
    the Telerik team
    Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
  3. DevCraft banner
  4. Wolfgang
    Wolfgang avatar
    98 posts
    Member since:
    Oct 2012

    Posted 26 Oct 2012 Link to this post

    Hi, I work at a new job where classic Telerik API is used. A connection to databases should be created on the fly (and not in app/wep config). The message with connection string looks quite nice, but it's the classic api...

    The manual in  link didn't help so much.

    What i was missing was the port. I found out that the database objects shows the port, if it is given in servername (like below):

    <servername>{server}:{port}</servername>

     

     

     

  5. Ralph Waldenmaier
    Admin
    Ralph Waldenmaier avatar
    202 posts

    Posted 26 Oct 2012 Link to this post

    Hi Wolfgang,

    I am not quite sure if your problem is gone when you use the approach you provided but you can also specify a connection string in the following manner.

    <connectionString>Data Source=SOMEDATASOURCE;User ID=USER;Password=PASSWORD;</connectionString>
    Of course the connection string needs to be customized to fit your needs.

    Feel free to ask if you have any other question.Kind regards,
    Ralph
    the Telerik team
    Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
Back to Top