액세스하는 방법 :F #의 SQL 형 제공자 :이 같은 일부 데이터에 액세스 할 TypeProvider을 사용하고
문제는 내가 이것을 얻고있다
type internal SqlConnection =
SqlEntityConnection<ConnectionString =
@"XXXXXXXXXX">
type FooRepository() =
member x.GetFoo (Id) =
let context = SqlConnection.GetDataContext()
query {for foo in context.Foos do
where (foo.Id = Id)
select foo}
:
내가 같은 문제를 참조 SO here에 물었다.The type 'FooRepository' is less accessible than the value, member or type 'member System.Linq.IQueryable' it is used in
나는이 유형을 보여주고 싶지 내가 SO에 대한 솔루션을 좋아하지 않기 때문에, 나는이 일을 시도 :
SqlDataConnection<ConnectionString =
@"XXXXXXX">
문제하면 데이터베이스가 푸른는 SQL 서버 그래서 나는이 점점 오전에 있다는 것이다 :
The type provider 'Microsoft.FSharp.Data.TypeProviders.DesignTime.DataProviders' reported an error: Error reading schema. Warning : SQM1012: Unable to extract table 'dbo.Foos from SqlServer.
아무도이 문제를 해결하는 방법에 대한 아이디어가 있습니까? TP 사용에 관한 가장 좋은 점 중 하나는 유형을 명시 적으로 정의 할 필요가 없다는 것입니다.하지만 꼭해야 할 것처럼 보입니다. Ugh
Azure에 대해 SqlDataConnection을 사용해 보셨나요? 나는 그것이 Azure Sql 서버 스토리지에 대해 사용될 수 있다고 생각하지 않습니다 ... –