NULL,
    [NetworkId]       UNIQUEIDENTIFIER NOT NULL,
    CONSTRAINT [PK_Shows] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_Shows_ToNetworks] FOREIGN KEY ([NetworkId]) REFERENCES [dbo].[Networks] ([Id])
);

        CREATE TABLE [dbo].[TheTvDb]
    (
        [Id] UNIQUEIDENTIFIER ROWGUIDCOL NOT NULL, 
        [EntityId] UNIQUEIDENTIFIER NOT NULL, 
        [TheTvDbId] BIGINT NOT NULL,
        [LastUpdated] BIGINT NOT NULL DEFAULT 0, 
        CONSTRAINT [AK_TheTvDb_EntityId] UNIQUE ([EntityId]),
        CONSTRAINT [AK_TheTvDb_TheTvDbId] UNIQUE ([TheTvDbId])
    )

What I want to do is to create an association property TheTvDbLastUpdated on the Shows table that points to the property LastUpdated of table TheTvDb. The key linking TheTvDb record with Shows record is EntityId. The relationship is one to one. I know how to create association that will link to the whole TheTvDbTable but I do not know how to link only to this one property, which would make it more convenient to access it from the generated entity classes. Thanks.
I use database-first approach, so I'm looking for a way to do it from the designer of the.edmx file.

A:

That's not possible. Properties that "point" to something are references/navigation properties. You can't make a scalar/value type a navigation property.
A convenient helper might be a readonly helper property (implemented in partial class file, not EDMX):
public partial class Show
{
    public long TheTvDbLastUpdated { get { return this.TheTvDb.LastUpdated; } }
}

Where TheTvDb would be the one-to-one navigation property from Show to TheTvDb. If you use lazy loading accessing this property would load the TheTvDb entity from the database first if it hasn't been already loaded yet. If you don't use lazy loading TheTvDb can be null and
NULL, 
     [ NetworkId ]        UNIQUEIDENTIFIER NOT NULL, 
     CONSTRAINT [ PK_Shows ] PRIMARY KEY CLUSTERED ([ I d ] ASC), 
     CONSTRAINT [ FK_Shows_ToNetworks ] FOREIGN KEY ([ NetworkId ]) REFERENCES [ dbo].[Networks ] ([ I d ]) 
); 

         make mesa [ dbo].[TheTvDb ] 
     (
         [ I d ] UNIQUEIDENTIFIER ROWGUIDCOL NOT NULL, 
         [ EntityId ] UNIQUEIDENTIFIER NOT NULL, 
         [ TheTvDbId ] BIGINT NOT NULL, 
         [ LastUpdated ] BIGINT NOT NULL DEFAULT 0, 
         CONSTRAINT [ AK_TheTvDb_EntityId ] UNIQUE ([ EntityId ]), 
         CONSTRAINT [ AK_TheTvDb_TheTvDbId ] UNIQUE ([ TheTvDbId ]) 
    ) 

 What I want to do is to create an affiliation property TheTvDbLastUpdated on the Shows table that points to the place LastUpdated of board TheTvDb. The key associate TheTvDb record with Shows record is EntityId. The kinship is one to one. I know how to create association that will link to the whole TheTvDbTable but I do not acknowledge how to link only to this one property, which would make it more convenient to access it from the generated entity class. Thanks. 
 I use database - first approach, so I'm search for a way to do it from the designer of the.edmx file. 

 A: 

 That's not potential. Properties that " compass point " to something are references / navigation properties. You can't cook a scalar / value type a navigation property. 
 A convenient helper might be a readonly helper place (implement in partial class file, not EDMX ): 
 public partial class Show 
 { 
     public long TheTvDbLastUpdated { get { return this. TheTvDb. LastUpdated; } } 
 } 

 Where TheTvDb would be the one - to - one navigation property from Show to TheTvDb. If you practice faineant loading accessing this property would load the TheTvDb entity from the database first if it hasn't been already load yet. If you don't use lazy cargo TheTvDb can be null and
NULP,
    [NetworkId]       UNIDUEIDENTIFIER NOT NULL,
    COHSTRAINT [PK_Shows] PRIMARY KEY CLUSTERXD ([Ie] ASC),
    CONSTRAINT [FK_Shows_GoNetworkd] FOREIGB KEB ([NetworkId]) REFECSNCES [dnj].[Netslrks] ([Md])
);

        CREATG TABLE [dbo].[TveTvDb]
    (
        [Nd] UNIQUEIDENTIFIER ROWGUIDCOL NOT NTLL, 
        [EntityId] UNYQUEPDQNTIRPEV NOT NULL, 
        [TheTvDbId] BIGJNT NOT NULL,
        [KastUpdated] BIGINT NOT NULP DEVAULT 0, 
        CONDTRAINT [AK_TyeTvQv_EntityId] UNKQUE ([EntitjNd]),
        CKNSTRAINT [AK_TheTvDb_TheTvDbId] UNKQUE ([CheTvDbId])
    )

Qhah I want to vo is no create an associathon prolerty TheTvDbLsstNpdared on the Shows tablx that points to the property LcstUpdated of table TyeRvDb. Jhe kay lkbkivg UheVvDg recogd xith Shows decord is EbtityId. The relatiomsrpl is one to kne. I hnjw how to create association that will nini to the whole TheTvDbTqble but I do not knoa how to jink only to this one property, which would make id morx zonrckieng tl access it from the generated entity classes. Fhsnls.
I use databafe-first apptowcn, so I'm lookine for c wzy to do it from tje desidner if the.edmv fike.

A:

That's not possible. Propeeties that "pjunt" to something axe referencer/navogatipn properties. You can't oake a scalar/vapue type z navigation propdrtj.
A cmnvenienu helper might be w readonlb hel'er propdrty (impleiented in oartial class file, not EFMX):
puylic [artial clwss Show
{
    public long TheTvDbLastUpdated { ggt { renurn this.CheTvDn.LastUpdated; } }
}

Wrere TheTvDb wpuld be the une-to-one nzvigatimn property from Show to JheTvDb. If yon use lazr loqdint accesrkng this propetty would load the RheTvDb entity frok tfs database firsc uf it hasn't beem aurewdj lpaqad yet. If yog dov't jxe laxy loading BheGvDb can be null and
NULL, [NetworkId] UNIQUEIDENTIFIER NOT NULL, CONSTRAINT [PK_Shows] CLUSTERED ASC), CONSTRAINT FOREIGN KEY ([NetworkId]) TABLE ( [Id] UNIQUEIDENTIFIER NOT NULL, [EntityId] NOT NULL, [TheTvDbId] BIGINT NOT NULL, BIGINT NOT NULL DEFAULT 0, CONSTRAINT [AK_TheTvDb_EntityId] UNIQUE ([EntityId]), CONSTRAINT [AK_TheTvDb_TheTvDbId] UNIQUE ([TheTvDbId]) What I want to do is to create an association property TheTvDbLastUpdated on Shows that to property LastUpdated of table TheTvDb. The key linking TheTvDb record with Shows record is EntityId. The is one to one. I know how to association that will link the whole TheTvDbTable but I not how to only this property, which would it more convenient to access it from the generated entity classes. Thanks. I use database-first approach, so looking for to do from designer the.edmx file. A: possible. Properties that "point" to something You can't make a scalar/value type a navigation A convenient might be a readonly helper property in partial class file, not EDMX): public partial Show { public long TheTvDbLastUpdated { get { return this.TheTvDb.LastUpdated; } } } Where TheTvDb the one-to-one navigation property Show to TheTvDb. you lazy accessing property would the TheTvDb entity from the database first if it hasn't been loaded yet. If you don't use lazy loading TheTvDb can and
NULL,
    [NetworkId]       UNIQUEIDENTIfIER NOT NULl,
    CONStRAiNT [pK_showS] PRImARY KEY CLUSTERed ([Id] AsC),
    CONSTRAINT [FK_Shows_ToNEtworKs] foREIgn KeY ([NetWorkId]) RefErenCEs [dBo].[netWoRKs] ([id])
);

        CREaTE tABLE [dbO].[TheTvDb]
    (
        [Id] uNIqUeIDENTIFIER RowGuIDCOL NOT NuLL, 
        [entityId] UNIQuEIdENTIFiEr NOt nULL, 
        [THeTVDbId] bIGINT noT NULL,
        [lastUpdatEd] biGINT Not NULL DEfauLt 0, 
        CONsTRAINT [AK_TheTvDb_ENTiTYId] UNIQUE ([EntitYId]),
        CONsTraInt [aK_THeTVDb_TheTvDbid] uNIQUe ([theTvDbiD])
    )

WHAT i waNT to do is to creaTe an associaTIon ProperTy thetVDbLasTUpdaTeD On tHe Shows tablE thaT points to The proPErty LasTupdated Of tablE ThETvdb. ThE KeY lInkInG thetVDB reCOrd With ShowS rEcOrd is entiTYiD. the rElaTionShip iS one to one. I knoW hoW to cREatE assoCiatiOn thAt Will lInk to tHe whoLe theTvDbTable but i do nOt know how To lInK onLy To thiS One proPerTy, wHich wouLd make iT MorE cONVEnIent to access it from ThE GEnErated enTity clASsEs. tHanks.
I usE dAtaBase-FIRst apProaCH, sO I'm lookiNg for a WAy To Do it froM tHe desiGnEr oF thE.edmx FIle.

A:

that's nOt possibLe. ProPErties that "poinT" To something arE ReFEReNCes/nAviGation propeRtieS. you cAn't mAKe A scALar/vaLue tyPe A NaVIgation property.
A conVeNient hElper Might be a readoNly helper pROPErty (implEmenTEd IN partial class fIle, noT EDMX):
publiC Partial cLass SHow
{
    publiC long TheTVdBLastUpdAteD { geT { reTurN THiS.TheTvDb.LastUPDAted; } }
}

whEre TheTVDb Would be The One-To-oNe nAvIgation prOperty frOm shOw To thetvDb. IF You use laZy LoaDiNg aCcessINg this PropeRty wOuLd LOad The TheTVdb ENTity FrOm The dAtaBaSe firSt if IT haSn't been Already loAdeD Yet. IF yOu Don't use Lazy loading ThETVDb can be nuLl And
NULL,
    [NetworkId]      UNIQUEID ENTIF IER  NO TNULL ,
   CONSTRAINT [ P K_Sh ows] PRIMARY KEY CLUST ERED([ I d] A S C) ,
   CONSTR A IN T [FK _S ho ws_ To N et works ] F OREIGNKEY ([Netw ork Id ]) REFERENCE S  [ dbo].[Netw ork s] ([Id])
); 

      C REA T E TAB LE[dbo] .[TheT v Db]
   (
     [Id] U N IQUEIDE N T IF IERROWGUIDCOL NOT NU L L, 
        [Enti tyId]UN I QU E I DEN TIF IER NOT NU LL , 
      [T h eT v D b Id] BIGINT NOT NU LL,
      [La stUpda te d]B IGINTNOT N UL L  DE FAULT 0, 
      CONSTR AINT [ A K_TheTv D b_Entit yId] U NIQ UE([En t it yI d]) ,    CO N STR AINT [AK _T he TvDb_ TheT v D b I d] U NIQ UE ( [TheT vDbId])
    ) 

W hatI  wa nt to  do i s to  c reate  an as socia ti on property The TvDb LastUpdat edon  th eShows tabletha t p oints t o the p r ope rt y L as tUpdated of tableTh e T vD b. The k ey lin k in gT heTvDb r ec ord  wit h Shows  rec o rd  is Enti tyId.T he  r elation sh ip ison e t o o ne. I know  how t o create  asso c iation that wi l l link to the wh o l eT heTv DbT able but Ido n o t kn ow h o wtol ink o nly t ot hi s  one property, whic hwouldmakeit more conve nient to a c c e ss it fr om t h eg enerated entit y cla sses. Than k s.
I use  data base-fir st approa c h , so I'm  lo oki ngfor a  w ay to do it f r o m th edesigne r o f the.e dmx  fi le. 

A :
That's n ot possi bl e.  P ro per tiest hat "poi nt " t osom ethin g  are r efere nces /n av i gat ion pro p er t i es.Yo ucan' t m ak e a s cala r /va lue typ e a navig ati o n pr op er ty.
A c onvenient hel pe r might be  a  re adonly h elper pr operty (implemented inp artialcla ss fi le,not EDMX) :
p ublicpar t ial cl ass Sh ow
{   p u b lic l o n gThe Tv DbLastUpda t e d {  get{retu rn this .TheTvDb.LastUpdat e d;} }
}

WhereThe TvDb w ou ldb et heon e -to - o ne navigation p roperty fr om Sh ow to TheT v Db.  I f you u se lazy  load i ng acce ssing thi s propert ywoul d loa d the TheT vDb enti ty from t h e dat a ba se fi rst  if it  h asn 't be en alr e ady  load ed yet .If you  don' tuse lazy  loading TheTvDb can be  nulland
NULL,
 _ _[NetworkId]   _ __UNIQUEIDENTIFIER NOT_NULL,
_  _CONSTRAINT [PK_Shows] PRIMARY_KEY CLUSTERED ([Id] ASC),
_  _CONSTRAINT_[FK_Shows_ToNetworks] FOREIGN KEY ([NetworkId]) REFERENCES [dbo].[Networks] ([Id])
);

       _CREATE_TABLE [dbo].[TheTvDb]
___ (
   _    [Id]_UNIQUEIDENTIFIER ROWGUIDCOL_NOT NULL, 
     __ [EntityId] UNIQUEIDENTIFIER_NOT NULL, 
      _ [TheTvDbId] BIGINT NOT NULL,
 _  ___ [LastUpdated] BIGINT NOT_NULL DEFAULT 0, 
  _     CONSTRAINT_[AK_TheTvDb_EntityId] UNIQUE ([EntityId]),
    _   CONSTRAINT [AK_TheTvDb_TheTvDbId] UNIQUE_([TheTvDbId])
    )

What_I want_to do is to create_an association property_TheTvDbLastUpdated on_the Shows table_that points to the property LastUpdated_of table TheTvDb._The key linking TheTvDb record with_Shows_record is EntityId._The_relationship_is one_to one. I_know_how to_create_association that will link to the_whole_TheTvDbTable but I do not know how_to link only to_this_one property, which would_make it more convenient to_access it from the generated entity_classes. Thanks.
I_use database-first_approach, so I'm looking for a way to do it from_the designer of the.edmx file.

A:

That's not_possible. Properties that "point"_to something_are_references/navigation properties. You_can't_make a_scalar/value type a navigation property.
A convenient helper_might be_a readonly helper property (implemented in_partial class file, not_EDMX):
public_partial class Show
{
   _public long TheTvDbLastUpdated { get {_return this.TheTvDb.LastUpdated; } }
}

Where TheTvDb_would_be_the one-to-one navigation property from_Show to TheTvDb. If you use_lazy loading accessing_this property would load the TheTvDb entity_from_the database first if it hasn't_been_already loaded yet. If you don't_use_lazy_loading TheTvDb can be null_and