linq2db / docs

Documentation sources and build scripts
2 stars 10 forks source link

Documentation on .net core doesn't work / more details #15

Open srad opened 6 years ago

srad commented 6 years ago

I just set up a .net core 2.1.x MVC project in VS2017 and tried with the documentation to get started and got a syntax error and some issues:

yield does not exist in context / Invalid token "break;

Steps to reproduce

public IEnumerable<IDataProviderSettings> DataProviders => yield break;

This works:

public IEnumerable<IDataProviderSettings> DataProviders => Enumerable.Empty<IDataProviderSettings>();

Also the docs are really thin. Where to I put also DataConnection.DefaultSettings = new MySettings();?

I assume in MVC apps in Startup.cs and I also don't know if it's supposed to be implemented like that anymore (?). Could you give in code examples also the entire file, so one can see exactly what you imported and so forth (like MS docs).

Thanks.

Environment details

linq2db version: 1.10.0
Database Server: MySql 5.7
Operating system: E.g. Windows 10
Framework version: .NET Core 2.1.x Visual Studio: 2017

ili commented 6 years ago

I assume in MVC apps in Startup.cs

You are absolutelly right

ili commented 6 years ago

yield does not exist in context / Invalid token "break;

thanks! we'll fix documentation