Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
Undup fk name.
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjiuno committed Dec 26, 2014
1 parent bfe4e93 commit 32ffc5f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
16 changes: 14 additions & 2 deletions EdmGenModelGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -845,8 +845,15 @@ public String CsdlPropType(TypeSpecification ts) {
return null;
}

List<ForeignKeyConstraint> alco = new List<ForeignKeyConstraint>();

public String SsdlAssociationSet(ForeignKeyConstraint dbco) {
return String.Format("{0}", dbco.Name);
int p = alco.IndexOf(dbco);
if (p < 0) {
p = alco.Count;
alco.Add(dbco);
}
return String.Format("{0}_{1}", dbco.Name, 1 + p);
}

public String SsdlAssociationRef(ForeignKeyConstraint dbco) {
Expand All @@ -858,7 +865,12 @@ public String SsdlAssociation(ForeignKeyConstraint dbco) {
}

public String CsdlAssociationSet(ForeignKeyConstraint dbco) {
return String.Format("{0}", dbco.Name);
int p = alco.IndexOf(dbco);
if (p < 0) {
p = alco.Count;
alco.Add(dbco);
}
return String.Format("{0}_{1}", dbco.Name, 1 + p);
}

public String CsdlAssociationRef(ForeignKeyConstraint dbco) {
Expand Down
6 changes: 3 additions & 3 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
// 既定値にすることができます:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.10.0.0")]
[assembly: AssemblyFileVersion("0.10.0.0")]
[assembly: AssemblyInformationalVersion("0.10.0.0")]
[assembly: AssemblyVersion("0.11.0.0")]
[assembly: AssemblyFileVersion("0.11.0.0")]
[assembly: AssemblyInformationalVersion("0.11.0.0")]

0 comments on commit 32ffc5f

Please # to comment.