Skip to content

Commit

Permalink
Update x-plat guides for beta8
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate McMaster committed Oct 16, 2015
1 parent 4aec001 commit 517a823
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 49 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,4 @@ samples/AngularSample/src/AngularSample/wwwroot/lib
project.lock.json
samples/WebApplication1/src/WebApplication1/wwwroot/lib/
**/sample/**/wwwroot/lib/
venv
10 changes: 5 additions & 5 deletions docs/getting-started/linux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ This walkthrough will create a simple console application using ASP.NET 5 and
the SQLite provider.

.. note::
This article was written for beta 7 of ASP.NET and EF7.
This article was written for beta 8 of ASP.NET and EF7.

You can find nightly builds of the EF7 code base hosted on https://www.myget.org/F/aspnetvnext/api/v2/ but the code base is rapidly changing and we do not maintain up-to-date documentation for getting started.
You can find nightly builds of the EF7 code base hosted on https://www.myget.org/gallery/aspnetvnext/ but the code base is rapidly changing and we do not maintain up-to-date documentation for getting started.


.. contents:: `In this article:`
Expand Down Expand Up @@ -41,7 +41,7 @@ The following steps will install `dnvm <https://github.com/aspnet/home#running-a

.. code-block:: console
~ $ sudo apt-get install libunwind8 libssl-dev unzip
~ $ sudo apt-get install unzip curl libunwind8 gettext libssl-dev libcurl3-dev zlib1g libicu-dev
- Install mono.

Expand All @@ -58,7 +58,7 @@ The following steps will install `dnvm <https://github.com/aspnet/home#running-a
~ $ mozroots --import --sync
- Run the dnvm
- Install dnvm

.. code-block:: console
Expand All @@ -70,7 +70,7 @@ The following steps will install `dnvm <https://github.com/aspnet/home#running-a
~ $ dnvm upgrade
If you have trouble installing dnvm, consult this `Getting Started guide <http://dotnet.github.io/core/getting-started/>`_.
If you have trouble installing dnvm, consult `Installing ASP.NET 5 on Linux <http://docs.asp.net/en/latest/getting-started/installing-on-linux.html>`_.


.. include:: x-plat/guide.rst
8 changes: 4 additions & 4 deletions docs/getting-started/osx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ This walkthrough will create a simple console application using ASP.NET 5 and
the SQLite provider.

.. note::
This article was written for OS X Mavericks or newer. It uses beta 7 of ASP.NET and EF7.
This article was written for OS X Mavericks or newer. It uses beta 8 of ASP.NET and EF7.

You can find nightly builds of the EF7 code base hosted on https://www.myget.org/F/aspnetvnext/api/v2/ but the code base is rapidly changing and we do not maintain up-to-date documentation for getting started.
You can find nightly builds of the EF7 code base hosted on https://www.myget.org/gallery/aspnetvnext/ but the code base is rapidly changing and we do not maintain up-to-date documentation for getting started.


.. contents:: `In this article:`
Expand Down Expand Up @@ -41,7 +41,7 @@ The following steps will install `dnvm <https://github.com/aspnet/home#running-a

.. code-block:: console
~ $ brew install mono
~ $ brew install mono icu4c
- Run the dnvm

Expand All @@ -55,7 +55,7 @@ The following steps will install `dnvm <https://github.com/aspnet/home#running-a
~ $ dnvm upgrade
If you have trouble installing dnvm, consult this `Getting Started guide <http://dotnet.github.io/core/getting-started/>`_.
If you have trouble installing dnvm, consult `Installing ASP.NET 5 on Mac OS X <http://docs.asp.net/en/latest/getting-started/installing-on-mac.html>`_.


.. include:: x-plat/guide.rst
24 changes: 15 additions & 9 deletions docs/getting-started/x-plat/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ To verify that this project has all dependencies and packages installed, perform
| _| | _| \_/ | //|\\
|___||_| / \\\/\\
Entity Framework Commands 7.0.0-beta7-15540
Entity Framework Commands 7.0.0-beta8-15964
Usage: ef [options] [command]
Usage: dnx ef [options] [command]
Options:
--version Show version information
Expand All @@ -73,7 +73,7 @@ To verify that this project has all dependencies and packages installed, perform
dbcontext Commands to manage your DbContext types
migrations Commands to manage your migrations
Use "ef [command] --help" for more information about a command.
Use "dnx ef [command] --help" for more information about a command.
Create your model
Expand Down Expand Up @@ -112,16 +112,22 @@ blog post from the command line.
- To make sure the files are correct, you can compile the project on the command line by running ``dnu build --quiet``

.. code-block:: console
:emphasize-lines: 4-6
:emphasize-lines: 9-11
~/ConsoleApp/ $ dnu build --quiet
Microsoft .NET Development Utility Mono-x86-1.0.0-beta6
Microsoft .NET Development Utility Mono-x64-1.0.0-beta8-15858
Building ConsoleApp for DNX,Version=v4.5.1
Building ConsoleApp for DNXCore,Version=v5.0
Build succeeded.
0 Warning(s)
0 Error(s)
Total build time elapsed: 00:00:01.9609581
Time elapsed 00:00:01.7288901
Total build time elapsed: 00:00:01.7470325
Total projects built: 1
Create your database
Expand Down Expand Up @@ -174,7 +180,7 @@ After adding the new post, you can verify the data has been added by inspecting
Workarounds
-----------

This demo was written for beta 7, which has bugs in it. The following workarounds will make this sample project work for beta 7.
This demo was written for beta 8, which has bugs in it. The following workarounds will make this sample project work for beta 8.

Add a Startup class to your project
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -183,11 +189,11 @@ When generating migrations, you may see this error message:

.. code-block:: console
System.InvalidOperationException: A type named 'StartupProduction' or 'Startup' could not be found in assembly 'ConsoleApp'.
System.InvalidOperationException: A type named 'StartupDevelopment' or 'Startup' could not be found in assembly 'ConsoleApp'.
To get around this, add the following into your project.

.. literalinclude:: x-plat/sample/src/ConsoleApp/Program.cs
:linenos:
:language: c#
:lines: 25-30
:lines: 25-29
5 changes: 2 additions & 3 deletions docs/getting-started/x-plat/issues.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
- Bugs in Mono 4.0.2 may cause Entity Framework to crash when using async methods. This is resolved with `Mono 4.2.0 <http://www.mono-project.com/docs/about-mono/releases/4.2.0/>`_, which is available as an alpha release (at time of writing).
- DNX-coreclr will die silentily if you are missing the ICU library. Make sure to install all dependencies listed in the install guide. (See `Issue dnx#2875 <https://github.com/aspnet/dnx/issues/2875>`_)
- Migrations on SQLite do not support more complex schema changes due to limitations in SQLite itself.

- Bugs in beta 7. See `Workarounds`_.
- Migrations requires that you have a "Startup" class in your project. `Issue #2357 <https://github.com/aspnet/EntityFramework/issues/2357>`_.
- Bugs in beta 8. See `Workarounds`_.
2 changes: 1 addition & 1 deletion docs/getting-started/x-plat/sample/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"projects": [ "src" ],
"sdk": {
"version": "1.0.0-beta7"
"version": "1.0.0-beta8"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ protected override void Up(MigrationBuilder migrationBuilder)
name: "Blog",
columns: table => new
{
BlogId = table.Column<int>(isNullable: false)
BlogId = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Name = table.Column<string>(isNullable: true),
Url = table.Column<string>(isNullable: true)
Name = table.Column<string>(nullable: true),
Url = table.Column<string>(nullable: true)
},
constraints: table =>
{
Expand All @@ -25,11 +25,11 @@ protected override void Up(MigrationBuilder migrationBuilder)
name: "Post",
columns: table => new
{
PostId = table.Column<int>(isNullable: false)
PostId = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
BlogId = table.Column<int>(isNullable: false),
Content = table.Column<string>(isNullable: true),
Title = table.Column<string>(isNullable: true)
BlogId = table.Column<int>(nullable: false),
Content = table.Column<string>(nullable: true),
Title = table.Column<string>(nullable: true)
},
constraints: table =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ partial class BloggingContextModelSnapshot : ModelSnapshot
protected override void BuildModel(ModelBuilder modelBuilder)
{
modelBuilder
.Annotation("ProductVersion", "7.0.0-beta7-15540");
.Annotation("ProductVersion", "7.0.0-beta8-15964");

modelBuilder.Entity("ConsoleApp.Blog", b =>
{
Expand All @@ -24,7 +24,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<string>("Url");
b.Key("BlogId");
b.HasKey("BlogId");
});

modelBuilder.Entity("ConsoleApp.Post", b =>
Expand All @@ -38,13 +38,13 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<string>("Title");
b.Key("PostId");
b.HasKey("PostId");
});

modelBuilder.Entity("ConsoleApp.Post", b =>
{
b.Reference("ConsoleApp.Blog")
.InverseCollection()
b.HasOne("ConsoleApp.Blog")
.WithMany()
.ForeignKey("BlogId");
});
}
Expand Down
3 changes: 1 addition & 2 deletions docs/getting-started/x-plat/sample/src/ConsoleApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ public void Main(string[] args)
}
}

// TODO: Remove. Will be unnecessary when bug #2357 fixed
// See https://github.com/aspnet/EntityFramework/issues/2357
// TODO: Remove. Will be fixed in the next release of EF.
public class Startup
{
public void Configure() { }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dependencies": {
"EntityFramework.Sqlite": "7.0.0-beta7",
"EntityFramework.Commands": "7.0.0-beta7",
"Microsoft.Dnx.Runtime.Abstractions": "1.0.0-beta7"
"EntityFramework.Sqlite": "7.0.0-beta8",
"EntityFramework.Commands": "7.0.0-beta8",
"Microsoft.Dnx.Runtime.Abstractions": "1.0.0-beta8"
},
"commands": {
"run": "ConsoleApp",
Expand Down

0 comments on commit 517a823

Please sign in to comment.