GetStoreType() public méthode

public GetStoreType ( TypeUsage edmType ) : TypeUsage
edmType TypeUsage
Résultat TypeUsage
    public void CanMapByteTypeToUTinyInt()
    {
      using (MySqlConnection connection = new MySqlConnection(GetConnectionString(true)))
      {
        MySqlProviderManifest pm = new MySqlProviderManifest(Version.ToString());
        TypeUsage tu = TypeUsage.CreateDefaultTypeUsage(
                PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.Byte));
        TypeUsage result = pm.GetStoreType(tu);
        Assert.AreEqual("utinyint", result.EdmType.Name);

      }
    }
    public void TestingMaxLengthFacet()
    {
      using (MySqlConnection connection = new MySqlConnection(GetConnectionString(true)))
      {
        MySqlProviderManifest pm = new MySqlProviderManifest(Version.ToString());
        TypeUsage tu = TypeUsage.CreateStringTypeUsage(
          PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.String), false, false);
        TypeUsage result = pm.GetStoreType(tu);
        Assert.AreEqual("longtext", result.EdmType.Name);

        tu = TypeUsage.CreateStringTypeUsage(
          PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.String), false, false, Int32.MaxValue);
        result = pm.GetStoreType(tu);
        Assert.AreEqual("longtext", result.EdmType.Name);

        tu = TypeUsage.CreateStringTypeUsage(
          PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.String), false, false, 70000);
        result = pm.GetStoreType(tu);
        Assert.AreEqual("mediumtext", result.EdmType.Name);

      }
    }