Hi

I followed all the threads on views and added the following view to a
2.5 database using NETProvider-2.6.5 , VS2010, EF 4.1 -Update 1 Edmx
Version="2.0".

. I followed all steps below and the view shows up in the Model Bowser
but not in the edmx model viewer. Is there something wrong with my code?

Thanks,

John

 

1) CREATE OR ALTER VIEW "VSupplier"(

    "SupplierID",

    "CompanyName",

    "ContactName",

    "ContactTitle",

    "Address",

    "City",

    "Region",

    "PostalCode",

    "Country",

    "Phone",

    "Fax",

    "HomePage")

AS

select "SupplierID", "CompanyName", "ContactName", "ContactTitle",
"Address", "City", "Region", "PostalCode", "Country",

           "Phone", "Fax", "HomePage"

    from "Suppliers";

COMMENT ON COLUMN "VSupplier"."SupplierID" IS 

'#PK_GEN#';

 

2) Add the following to ssdl  <!-- SSDL content -->
<edmx:StorageModels>    <Schema Namespace="NorthwindIB.Store"
Alias="Self" Provider="FirebirdSql.Data.FirebirdClient"
ProviderManifestToken="2.5"
xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSch
emaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl";>

<EntityContainer Name="NorthwindIBStoreContainer">

 

a)    <EntitySet Name="VSupplier"
EntityType="NorthwindIB.Store.VSupplier" store:Type="Views"
store:Schema="Firebird" store:Name="VSupplier" />

b)  <!--Errors Found During Generation:

      warning 6013: The table/view 'Firebird.Firebird.VSupplier' does
not have a primary key defined and no valid primary key could be
inferred. This table/view has been excluded. To use the entity, you will
need to review your schema, add the correct keys, and uncomment it.

      StoreGeneratedPattern="Identity"

      -->

      <EntityType Name="VSupplier">

        <Key>

          <PropertyRef Name="SupplierID" />

        </Key>

        <Property Name="SupplierID" Type="int" Nullable="false"
StoreGeneratedPattern="Identity" />

        <Property Name="CompanyName" Type="varchar" MaxLength="40" />

        <Property Name="ContactName" Type="varchar" MaxLength="30" />

        <Property Name="ContactTitle" Type="varchar" MaxLength="30" />

        <Property Name="Address" Type="varchar" MaxLength="60" />

        <Property Name="City" Type="varchar" MaxLength="15" />

        <Property Name="Region" Type="varchar" MaxLength="15" />

        <Property Name="PostalCode" Type="varchar" MaxLength="10" />

        <Property Name="Country" Type="varchar" MaxLength="15" />

        <Property Name="Phone" Type="varchar" MaxLength="24" />

        <Property Name="Fax" Type="varchar" MaxLength="24" />

        <Property Name="HomePage" Type="clob" />

      </EntityType>

 

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to