private static T GetExistingEdmType <T>(EdmModel model, Type type) where T : EdmType { EdmType structuralOrEnumType = model.GetStructuralOrEnumType(type.Name); if (structuralOrEnumType != null && type != structuralOrEnumType.GetClrType()) { throw new NotSupportedException(Strings.SimpleNameCollision((object)type.FullName, (object)structuralOrEnumType.GetClrType().FullName, (object)type.Name)); } return(structuralOrEnumType as T); }