This is a migrated thread and some comments may be shown as answers.

Trying to get started

4 Answers 155 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Steven
Top achievements
Rank 1
Steven asked on 05 Apr 2010, 01:45 PM
Hi all,

love the Telerik asp.net stuff but this is driving me mental, i may have set my project up wrong but i followed what guides i can find and also code samples but cant get past this problem...

I have a database with 4 tables in it, event, guest, contact, invite
I created a project called Wedding (i'm getting married shortly so seemed like a good test)
I added a telerik rlinq file and it popped up with the wizard
i gave it my very simple local host connection string
pluralised the collections and essentially just followed the whats new guide in the telerik tv slot.
i also said for it to use attributes instead of xml
i put the entity diagram in its own namespace

ok now that the diagram was built i added a public shared function to a class called CreateContact

 

 

        Dim c As New EntityDiagrams.Wedding_Contact  
        c.FirstName = "steven" 
        Using scope As New EntityDiagrams.WeddingED("Live")  
            scope.Wedding_contacts.Add(c)  
            scope.SaveChanges(Telerik.OpenAccess.ConcurrencyConflictsProcessingMode.StopOnFirst)  
        End Using 

 

 


autogenerated app.config looks like this:

<?xml version="1.0"?>  
<configuration> 
  <configSections> 
    <section name="openaccess" type="Telerik.OpenAccess.Config.ConfigSectionHandler, Telerik.OpenAccess.Config, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342" requirePermission="false" /> 
  </configSections> 
  <system.diagnostics> 
    <sources> 
      <!-- This section defines the logging configuration for My.Application.Log --> 
      <source name="DefaultSource" switchName="DefaultSwitch">  
        <listeners> 
          <add name="FileLog" /> 
          <!-- Uncomment the below section to write to the Application Event Log --> 
          <!--<add name="EventLog"/>--> 
        </listeners> 
      </source> 
    </sources> 
    <switches> 
      <add name="DefaultSwitch" value="Information" /> 
    </switches> 
    <sharedListeners> 
      <add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter" /> 
      <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log --> 
      <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> --> 
    </sharedListeners> 
  </system.diagnostics> 
  <connectionStrings> 
    <add name="Live" connectionString="data source=SG-LA-001;initial catalog=Wedding;integrated security=True" providerName="System.Data.SqlClient" /> 
  </connectionStrings> 
  <openaccess xmlns="http://www.telerik.com/OpenAccess">  
    <references /> 
  </openaccess> 
</configuration> 

clicked build, all built ok...

Next i added a little console app to call this function

 

Wedding.Class1.CreateContact() 

i also added openaccess and openaccessextensions35 as references

built and ran the bot and received this error message

No Backend and no ProviderName given for connection string with id='GeneratedConnectionStringName0'. Parameter name: connectionStringSettings 

googled it, comes back with nothing whatsoever...

downloaded the telerik examples codes, for some of the settings they tell the scope which connection string to use, okay, so i did that as show in code example at the top, no luck same message. put app.config in the settings section of the wedding, still no luck...

Are there any examples out there of how to create a multi-tier project, entity, bll, presenter as i'm finding it hard to find material on getting started... i've noticed a lot of the posts have got further that the initial setup, if anyone has any links to code or just a quick startup guide with multi-project solutions i'd very much appreciate it,

Cheers guys,

Steven

4 Answers, 1 is accepted

Sort by
0
Greg
Top achievements
Rank 1
answered on 05 Apr 2010, 08:33 PM
I can't find any code examples using the new designer, but try copying the connectionStrings section generated in your class library into the console applications app.config file to resolve the error you are encountering.
0
PetarP
Telerik team
answered on 06 Apr 2010, 05:51 PM
Hello Greg,

We are aware of that behavior and we are currently working on the fix. There are two possible workarounds:
1. Use what Greg provided and indeed move your connection string to the config file of the console application.
2. Explicitly specify the connection details in your data context class (By default your data context class is named exactly after your rlinq file). You will have to specify the exact connection string in the connectionStringName variable and the Backend in the default constructor:
private static string connectionStringName = @"data source=(local)\SQLEXPRESS;initial catalog=Northwind;integrated security=True;";
        //private static string connectionStringName = "NorthwindEntityDiagrams";
             
        private static MetadataSource metadataSource = XmlMetadataSource.FromAssemblyResource("EntityDiagrams1.rlinq");
 
        //public NorthwindEntityDiagrams()
        //    : base(connectionStringName, null, metadataSource)
        //{ }
        public NorthwindEntityDiagrams()
            : base(connectionStringName, new BackendConfiguration() { Driver = "genericADO2", Backend = "mssql" }, metadataSource)
        { }
The above code shows all the things that need to be changed. Please note that the commented out code is actually the code that was originally generated by Telerik OpenAccess ORM.
We are sorry for the inconvenience this might be causing to you.

Sincerely yours,
Petar
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Steven
Top achievements
Rank 1
answered on 10 Apr 2010, 01:02 AM
Hi Petar,

i think your new release next week will solve a lot of the issues hopefully we've been experiencing...

any ideas when the full documentation is getting updated?

cheers

steven
0
PetarP
Telerik team
answered on 12 Apr 2010, 03:42 PM
Hello Steven,

The latest documentation is available with the chm files that are being installed together with the product. While this is not yet the full documentation, it is our latest one. We are aiming for constant updates there until we have all functionality covered. You can find the documentation file under [install dir]\Telerik\OpenAccess ORM\documentation\TelerikOpenAccessORM.chm.

Regards,
Petar
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Getting Started
Asked by
Steven
Top achievements
Rank 1
Answers by
Greg
Top achievements
Rank 1
PetarP
Telerik team
Steven
Top achievements
Rank 1
Share this question
or