'CompanyName.Foo' is a 'namespace' but is used like a 'type'

后端 未结 8 1098
暗喜
暗喜 2020-12-01 00:26

Restatement of the question

I\'m resurrecting this question because I just ran into this error again today, and I\'m still utterly confused why the

8条回答
  •  粉色の甜心
    2020-12-01 00:27

    1. The clash is between namespace CompanyName.Foo and CompanyName.Foo.Models.Foo, and not Foo. I'm not exactly sure how/why the compiler can't distinguish both though.

    2. You can try using namespace alias to shorten full qualifying Foo
      e.g. using coyModels = CompanyName.Foo.Models

    3. From the reference, seems like you can use /context: and /namespace: to specify the data context class (instead of using table name) and namespace.

提交回复
热议问题