| 

.NET C# Java Javascript Exception

2
Hallo,

ist es möglich zu ermitteln von welchen Typ ein Entity ist?
Table, View oder Store Procedure
Wenn ja, wie?

Danke.
Fralex
News:
18.03.2011
fralex 61 1 4
1 Antwort
1
Wenn ich mir den generierten Code ansehe, würde ich sagen, dass sich Table und View nicht unterscheiden. Eine Stored Procedure sieht dagegen doch anders aus. Table und View erben von EntityObject, Stored Procedure erbt von ComplexObject.

/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmEntityTypeAttribute(NamespaceName="TestDbModel", Name="Table_1")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class Table_1 : EntityObject
{
#region Factory Method

/// <summary>
/// Create a new Table_1 object.
/// </summary>
/// <param name="id">Initial value of the Id property.</param>
public static Table_1 CreateTable_1(global::System.Guid id)
{
Table_1 table_1 = new Table_1();
table_1.Id = id;
return table_1;
}

#endregion


/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmEntityTypeAttribute(NamespaceName="TestDbModel", Name="View_1")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class View_1 : EntityObject
{
#region Factory Method

/// <summary>
/// Create a new View_1 object.
/// </summary>
/// <param name="id">Initial value of the Id property.</param>
public static View_1 CreateView_1(global::System.Guid id)
{
View_1 view_1 = new View_1();
view_1.Id = id;
return view_1;
}

#endregion


/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmComplexTypeAttribute(NamespaceName="TestDbModel", Name="StoreProcedure_1_Result")]
[DataContractAttribute(IsReference=true)]
[Serializable()]
public partial class StoreProcedure_1_Result : ComplexObject
{
#region Factory Method

/// <summary>
/// Create a new StoreProcedure_1_Result object.
/// </summary>
/// <param name="id">Initial value of the Id property.</param>
public static StoreProcedure_1_Result CreateStoreProcedure_1_Result(global::System.Guid id)
{
StoreProcedure_1_Result storeProcedure_1_Result = new StoreProcedure_1_Result();
storeProcedure_1_Result.Id = id;
return storeProcedure_1_Result;
}

#endregion
18.03.2011
Jürgen Luhr 7,1k 2 9

Stelle deine Framework-Frage jetzt!