list of movies
This commit is contained in:
parent
cdef03d432
commit
57fda15fdd
166
MovieBase/Content/PagedList.css
Normal file
166
MovieBase/Content/PagedList.css
Normal file
@ -0,0 +1,166 @@
|
||||
.pagination {
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.pagination > li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 6px 12px;
|
||||
margin-left: -1px;
|
||||
line-height: 1.428571429;
|
||||
text-decoration: none;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.pagination > li:first-child > a,
|
||||
.pagination > li:first-child > span {
|
||||
margin-left: 0;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-top-left-radius: 4px;
|
||||
}
|
||||
|
||||
.pagination > li:last-child > a,
|
||||
.pagination > li:last-child > span {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
.pagination > li > a:hover,
|
||||
.pagination > li > span:hover,
|
||||
.pagination > li > a:focus,
|
||||
.pagination > li > span:focus {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.pagination > .active > a,
|
||||
.pagination > .active > span,
|
||||
.pagination > .active > a:hover,
|
||||
.pagination > .active > span:hover,
|
||||
.pagination > .active > a:focus,
|
||||
.pagination > .active > span:focus {
|
||||
z-index: 2;
|
||||
color: #ffffff;
|
||||
cursor: default;
|
||||
background-color: #428bca;
|
||||
border-color: #428bca;
|
||||
}
|
||||
|
||||
.pagination > .disabled > span,
|
||||
.pagination > .disabled > a,
|
||||
.pagination > .disabled > a:hover,
|
||||
.pagination > .disabled > a:focus {
|
||||
color: #999999;
|
||||
cursor: not-allowed;
|
||||
background-color: #ffffff;
|
||||
border-color: #dddddd;
|
||||
}
|
||||
|
||||
.pagination-lg > li > a,
|
||||
.pagination-lg > li > span {
|
||||
padding: 10px 16px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.pagination-lg > li:first-child > a,
|
||||
.pagination-lg > li:first-child > span {
|
||||
border-bottom-left-radius: 6px;
|
||||
border-top-left-radius: 6px;
|
||||
}
|
||||
|
||||
.pagination-lg > li:last-child > a,
|
||||
.pagination-lg > li:last-child > span {
|
||||
border-top-right-radius: 6px;
|
||||
border-bottom-right-radius: 6px;
|
||||
}
|
||||
|
||||
.pagination-sm > li > a,
|
||||
.pagination-sm > li > span {
|
||||
padding: 5px 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.pagination-sm > li:first-child > a,
|
||||
.pagination-sm > li:first-child > span {
|
||||
border-bottom-left-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
}
|
||||
|
||||
.pagination-sm > li:last-child > a,
|
||||
.pagination-sm > li:last-child > span {
|
||||
border-top-right-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
.pager {
|
||||
padding-left: 0;
|
||||
margin: 20px 0;
|
||||
text-align: center;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.pager:before,
|
||||
.pager:after {
|
||||
display: table;
|
||||
content: " ";
|
||||
}
|
||||
|
||||
.pager:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.pager:before,
|
||||
.pager:after {
|
||||
display: table;
|
||||
content: " ";
|
||||
}
|
||||
|
||||
.pager:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.pager li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.pager li > a,
|
||||
.pager li > span {
|
||||
display: inline-block;
|
||||
padding: 5px 14px;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #dddddd;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
.pager li > a:hover,
|
||||
.pager li > a:focus {
|
||||
text-decoration: none;
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.pager .next > a,
|
||||
.pager .next > span {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.pager .previous > a,
|
||||
.pager .previous > span {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.pager .disabled > a,
|
||||
.pager .disabled > a:hover,
|
||||
.pager .disabled > a:focus,
|
||||
.pager .disabled > span {
|
||||
color: #999999;
|
||||
cursor: not-allowed;
|
||||
background-color: #ffffff;
|
||||
}
|
@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using MovieBase.Models;
|
||||
using PagedList;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
@ -8,10 +10,14 @@ namespace MovieBase.Controllers
|
||||
{
|
||||
public class MovieController : Controller
|
||||
{
|
||||
private ApplicationDbContext db = new ApplicationDbContext();
|
||||
|
||||
// GET: Movie
|
||||
public ActionResult Index()
|
||||
public ActionResult Index(int? page)
|
||||
{
|
||||
return View();
|
||||
var movies = db.Movies.OrderBy(m => m.Name);
|
||||
int pageNumber = page ?? 1;
|
||||
return View(movies.ToPagedList(pageNumber, 3));
|
||||
}
|
||||
}
|
||||
}
|
29
MovieBase/Migrations/201905041159055_add data.Designer.cs
generated
Normal file
29
MovieBase/Migrations/201905041159055_add data.Designer.cs
generated
Normal file
@ -0,0 +1,29 @@
|
||||
// <auto-generated />
|
||||
namespace MovieBase.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
|
||||
public sealed partial class adddata : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(adddata));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201905041159055_add data"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
16
MovieBase/Migrations/201905041159055_add data.cs
Normal file
16
MovieBase/Migrations/201905041159055_add data.cs
Normal file
@ -0,0 +1,16 @@
|
||||
namespace MovieBase.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class adddata : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
126
MovieBase/Migrations/201905041159055_add data.resx
Normal file
126
MovieBase/Migrations/201905041159055_add data.resx
Normal file
@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Target" xml:space="preserve">
|
||||
<value>H4sIAAAAAAAEAN1d227ku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R8mCp80KRpVhSTHjt7tCdEvVFAxAJRZMCkqdnlUTugQl42CIY1MjoY8t99p3u6jZMY4ds2mckh6VKvydQclcry0R821BqTNUvwMo9azkPpTi7SZwtN+a7V2Wabfkiv2uqrMPoJ5QUaG0/xrsXWNNl+Bx4IWsdpXWBwY26mruv55612DTZYAcONisqqYPDGv7uj/3jDTjK3TvNdBy9ZCoVr5KlhrUjWPKG/xlJsXU9RcJVnvp2WpKRkXK1PuUKNPnKsrqulZtZW+JN2kCvlm5guJbYuq6M91kDcC1EzZd9JPqC94kzYibXdaR2KN9Wru1UiOldbG0T/u0mjLRtrnpndU6N+3TPrem+FIJVd1OYBu1oNXsCePi8brc0qyGXJOiJkeDxLy47ppxTgxiQt3mVaytdemGi1dnvsnxC7acQsX+zhe/5Rp5ZYWt6lMOHde7JllW+VGIQ66J5xHQ/lWKLleuNRn9PZXADyIU7oDWZFW/n4r3QUQy5NaxqHCXk2SxScn8d2TYrM2CVUOC/OdkMfQ4Y7LucxMvk8qmFTiquogveiACPrY0L1IULIGHcDPJDSi+t1m8byUZKgvo38QPOVrnCC8ZRouQexdJbOO2+Ysyfp7nycOa/MqGWAJmMyA5FQ/x5zwI/Zrva8ULHA0JYnTTN/FEl4i8kV+91ZTuk9iQEBVf7Ss8wmgdYmLZQzwHL7APbxh+t3AFvLfm5ayOSLcieLFPLgOwSkGUURrNePwTY9iPXn/8P4C9L9+VbwAA</value>
|
||||
</data>
|
||||
<data name="DefaultSchema" xml:space="preserve">
|
||||
<value>dbo</value>
|
||||
</data>
|
||||
</root>
|
29
MovieBase/Migrations/201905041523391_user watce.Designer.cs
generated
Normal file
29
MovieBase/Migrations/201905041523391_user watce.Designer.cs
generated
Normal file
@ -0,0 +1,29 @@
|
||||
// <auto-generated />
|
||||
namespace MovieBase.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
|
||||
public sealed partial class userwatce : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(userwatce));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201905041523391_user watce"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
63
MovieBase/Migrations/201905041523391_user watce.cs
Normal file
63
MovieBase/Migrations/201905041523391_user watce.cs
Normal file
@ -0,0 +1,63 @@
|
||||
namespace MovieBase.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class userwatce : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
DropForeignKey("dbo.MovieActors", "Movie_MovieId", "dbo.Movies");
|
||||
DropForeignKey("dbo.MovieActors", "Actor_ActorId", "dbo.Actors");
|
||||
DropIndex("dbo.MovieActors", new[] { "Movie_MovieId" });
|
||||
DropIndex("dbo.MovieActors", new[] { "Actor_ActorId" });
|
||||
CreateTable(
|
||||
"dbo.ApplicationUserMovies",
|
||||
c => new
|
||||
{
|
||||
ApplicationUser_Id = c.String(nullable: false, maxLength: 128),
|
||||
Movie_MovieId = c.Guid(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => new { t.ApplicationUser_Id, t.Movie_MovieId })
|
||||
.ForeignKey("dbo.AspNetUsers", t => t.ApplicationUser_Id, cascadeDelete: true)
|
||||
.ForeignKey("dbo.Movies", t => t.Movie_MovieId, cascadeDelete: true)
|
||||
.Index(t => t.ApplicationUser_Id)
|
||||
.Index(t => t.Movie_MovieId);
|
||||
|
||||
DropTable("dbo.Actors");
|
||||
DropTable("dbo.MovieActors");
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
CreateTable(
|
||||
"dbo.MovieActors",
|
||||
c => new
|
||||
{
|
||||
Movie_MovieId = c.Guid(nullable: false),
|
||||
Actor_ActorId = c.Guid(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => new { t.Movie_MovieId, t.Actor_ActorId });
|
||||
|
||||
CreateTable(
|
||||
"dbo.Actors",
|
||||
c => new
|
||||
{
|
||||
ActorId = c.Guid(nullable: false, identity: true),
|
||||
FirstName = c.String(),
|
||||
LastName = c.String(),
|
||||
})
|
||||
.PrimaryKey(t => t.ActorId);
|
||||
|
||||
DropForeignKey("dbo.ApplicationUserMovies", "Movie_MovieId", "dbo.Movies");
|
||||
DropForeignKey("dbo.ApplicationUserMovies", "ApplicationUser_Id", "dbo.AspNetUsers");
|
||||
DropIndex("dbo.ApplicationUserMovies", new[] { "Movie_MovieId" });
|
||||
DropIndex("dbo.ApplicationUserMovies", new[] { "ApplicationUser_Id" });
|
||||
DropTable("dbo.ApplicationUserMovies");
|
||||
CreateIndex("dbo.MovieActors", "Actor_ActorId");
|
||||
CreateIndex("dbo.MovieActors", "Movie_MovieId");
|
||||
AddForeignKey("dbo.MovieActors", "Actor_ActorId", "dbo.Actors", "ActorId", cascadeDelete: true);
|
||||
AddForeignKey("dbo.MovieActors", "Movie_MovieId", "dbo.Movies", "MovieId", cascadeDelete: true);
|
||||
}
|
||||
}
|
||||
}
|
126
MovieBase/Migrations/201905041523391_user watce.resx
Normal file
126
MovieBase/Migrations/201905041523391_user watce.resx
Normal file
@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Target" xml:space="preserve">
|
||||
<value>H4sIAAAAAAAEAOVd3W7juBW+L9B3EHTVFlkrP53BNHB2kXGSbdBJMhhndvcuoCXaIUaivBKVdVD0yXqxj7SvUFJ/lvgjkZJsKygWWIwl8juHh98hD6lzZv747+/THzaBb73AKEYhvrBPJse2BbEbegivLuyELL/7YP/w/Z//NL32go31U9HujLWjPXF8YT8Tsj53nNh9hgGIJwFyozAOl2TihoEDvNA5PT7+h3Ny4kAKYVMsy5p+STBBAUx/0J+zELtwTRLg34Ue9OP8OX0zT1GtexDAeA1ceGHfhS8IfgQxnGRtbevSR4DqMYf+0rYAxiEBhGp5/jWGcxKFeDVf0wfAf3xdQ9puCfwY5tqfb5vrDuT4lA3E2XYsoNwkJmFgCHhyllvG4bt3sq9dWo7a7pramLyyUaf2y01nW7yk85kfsVaibSfpgyOrfH5UUoAyhf13ZM0SnyQRvMAwIRHwj6zPycJH7r/g62P4DeILnPh+VS2qGH1Xe0AffY7CNYzI6xe4rCp769mWU+/s8L3LvnzHbEw/Joj++Z5qARY+LKe/Mvw5CSP4I8QwAgR6nwEhMKKzd+vB1ICCBpw89v9CGOUbdRzbugObTxCvyDNVB2xs6wZtoFc8yTX4ihH1M9qJRAlsE0J/eonL1H1EW3FXVOHstz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EhKr62C5YytpYmYPpDFZeK9tFNWWdLMLmYHyV7NYx1Cs0a39uFT3Tx0fWbfw1XTvPrUdqDbqKN3jWUEUkkquOfSxJqZ2H3hfqFRv603D7y1PW9ch6iGi4cG4dc8bvslgKVXy9HF2s1DOAG7Qar1+U8caq3AbbOiVFbINhH5L3Q1au9WPW3kvCDr3A1AvFjLTJuu5z2sXblDcV+Xbb39mgD7C/t1+f6Nle685DcZBUXTu0z55MageKizCDOh83SNXRV0PRGlJdx050GLrcbQQFGpIE2cMXte0zt7vpw+bIyy/MStdGRrY8Bj58gdq+yab68jlyshmVoY2Ma1lQfPBqs30zTfGVbuREa/+0NGreSSPEBrV0CtDeEP90vi92j4gPz0fZt8PK7IvTLZ3f/wPu6c98w1fU3dOu9UPuHhjXsWh0LHWih9xhWxJSxrG9HrwQVCyv4OdUUuGpLvDMkgQubG8R0jnPTtGKMh8eWdiTBRlCC5m07O8zklYrtdeJ6pWJNotVlBQ2yc6PNI2y8zbNshWFek2yMw9sFJ01aZYsr1pSCW4R2iZQT5h8R2tjVQORZS1FNQ5cRFurK2spnG677mlM1H5LNbODGKXmpYqM47dTIjuISap+LM+23XFJbFmUaVgZq8hL3IG5mlYhddrlrs1W1KCamk2eHymecirjkw5oFCbacdmw1DFkTrEX9zIoExZzRGnYWfmXfWjoG6PVFoL9Oz8YurWAs2xzi5dhEfdyGhVN+I88kACPRqOXEUFL4BL6muUNpX+3YpqLwbLXFtC7xQ8JWSeEDhkGC7+Wp8Di5yb5aS10Xefpw5r9iocYAlUTsXyrB/wxQb5X6n0j+aCkgGCBeZ6lw+aSsGyd1WuJdB9iTaDcfOV54hEGa5+CxQ94Dl5gF90o/T7BFXBft4kbKpD2iaibfXqFwCoCQZxjbPvTn5TDXrD5/n9FeoCw4GoAAA==</value>
|
||||
</data>
|
||||
<data name="DefaultSchema" xml:space="preserve">
|
||||
<value>dbo</value>
|
||||
</data>
|
||||
</root>
|
29
MovieBase/Migrations/201905041602074_adin.Designer.cs
generated
Normal file
29
MovieBase/Migrations/201905041602074_adin.Designer.cs
generated
Normal file
@ -0,0 +1,29 @@
|
||||
// <auto-generated />
|
||||
namespace MovieBase.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
|
||||
public sealed partial class adin : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(adin));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201905041602074_adin"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
16
MovieBase/Migrations/201905041602074_adin.cs
Normal file
16
MovieBase/Migrations/201905041602074_adin.cs
Normal file
@ -0,0 +1,16 @@
|
||||
namespace MovieBase.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class adin : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
126
MovieBase/Migrations/201905041602074_adin.resx
Normal file
126
MovieBase/Migrations/201905041602074_adin.resx
Normal file
@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Target" xml:space="preserve">
|
||||
<value>H4sIAAAAAAAEAOVd3W7juBW+L9B3EHTVFlkrP53BNHB2kXGSbdBJMhhndvcuoCXaIUaivBKVdVD0yXqxj7SvUFJ/lvgjkZJsKygWWIwl8juHh98hD6lzZv747+/THzaBb73AKEYhvrBPJse2BbEbegivLuyELL/7YP/w/Z//NL32go31U9HujLWjPXF8YT8Tsj53nNh9hgGIJwFyozAOl2TihoEDvNA5PT7+h3Ny4kAKYVMsy5p+STBBAUx/0J+zELtwTRLg34Ue9OP8OX0zT1GtexDAeA1ceGHfhS8IfgQxnGRtbevSR4DqMYf+0rYAxiEBhGp5/jWGcxKFeDVf0wfAf3xdQ9puCfwY5tqfb5vrDuT4lA3E2XYsoNwkJmFgCHhyllvG4bt3sq9dWo7a7pramLyyUaf2y01nW7yk85kfsVaibSfpgyOrfH5UUoAyhf13ZM0SnyQRvMAwIRHwj6zPycJH7r/g62P4DeILnPh+VS2qGH1Xe0AffY7CNYzI6xe4rCp769mWU+/s8L3LvnzHbEw/Joj++Z5qARY+LKe/Mvw5CSP4I8QwAgR6nwEhMKKzd+vB1ICCBpw89v9CGOUbdRzbugObTxCvyDNVB2xs6wZtoFc8yTX4ihH1M9qJRAlsE0J/eonL1H1EW3FXVOHst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vEhKr62C5YytpYmYPpDFZeK9tFNWWdLMLmYHyV7NYx1Cs0a39uFT3Tx0fWbfw1XTvPrUdqDbqKN3jWUEUkkquOfSxJqZ2H3hfqFRv603D7y1PW9ch6iGi4cG4dc8bvslgKVXy9HF2s1DOAG7Qar1+U8caq3AbbOiVFbINhH5L3Q1au9WPW3kvCDr3A1AvFjLTJuu5z2sXblDcV+Xbb39mgD7C/t1+f6Nle685DcZBUXTu0z55MageKizCDOh83SNXRV0PRGlJdx050GLrcbQQFGpIE2cMXte0zt7vpw+bIyy/MStdGRrY8Bj58gdq+yab68jlyshmVoY2Ma1lQfPBqs30zTfGVbuREa/+0NGreSSPEBrV0CtDeEP90vi92j4gPz0fZt8PK7IvTLZ3f/wPu6c98w1fU3dOu9UPuHhjXsWh0LHWih9xhWxJSxrG9HrwQVCyv4OdUUuGpLvDMkgQubG8R0jnPTtGKMh8eWdiTBRlCC5m07O8zklYrtdeJ6pWJNotVlBQ2yc6PNI2y8zbNshWFek2yMw9sFJ01aZYsr1pSCW4R2iZQT5h8R2tjVQORZS1FNQ5cRFurK2spnG677mlM1H5LNbODGKXmpYqM47dTIjuISap+LM+23XFJbFmUaVgZq8hL3IG5mlYhddrlrs1W1KCamk2eHymecirjkw5oFCbacdmw1DFkTrEX9zIoExZzRGnYWfmXfWjoG6PVFoL9Oz8YurWAs2xzi5dhEfdyGhVN+I88kACPRqOXEUFL4BL6muUNpX+3YpqLwbLXFtC7xQ8JWSeEDhkGC7+Wp8Di5yb5aS10Xefpw5r9iocYAlUTsXyrB/wxQb5X6n0j+aCkgGCBeZ6lw+aSsGyd1WuJdB9iTaDcfOV54hEGa5+CxQ94Dl5gF90o/T7BFXBft4kbKpD2iaibfXqFwCoCQZxjbPvTn5TDXrD5/n9FeoCw4GoAAA==</value>
|
||||
</data>
|
||||
<data name="DefaultSchema" xml:space="preserve">
|
||||
<value>dbo</value>
|
||||
</data>
|
||||
</root>
|
@ -1,19 +1,57 @@
|
||||
using MovieBase.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Web;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.Owin;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using System.Data.Entity.Validation;
|
||||
|
||||
namespace MovieBase.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Linq;
|
||||
|
||||
internal sealed class Configuration : DbMigrationsConfiguration<MovieBase.Models.ApplicationDbContext>
|
||||
internal sealed class Configuration : DbMigrationsConfiguration<ApplicationDbContext>
|
||||
{
|
||||
public Configuration()
|
||||
{
|
||||
AutomaticMigrationsEnabled = true;
|
||||
}
|
||||
|
||||
protected override void Seed(MovieBase.Models.ApplicationDbContext context)
|
||||
protected override void Seed(ApplicationDbContext context)
|
||||
{
|
||||
var user = new ApplicationUser() { UserName = "admin@admin.com", Email = "admin@admin.com" };
|
||||
try
|
||||
{
|
||||
UserStore<ApplicationUser> userStore = new UserStore<ApplicationUser>(context);
|
||||
ApplicationUserManager userManager = new ApplicationUserManager(userStore);
|
||||
userManager.Create(user, "!Admin1");
|
||||
// ApplicationUserManager userManager = HttpContext.Current.GetOwinContext().GetUserManager<ApplicationUserManager>();
|
||||
// userManager.Create(user, "admin");
|
||||
context.SaveChanges();
|
||||
|
||||
}
|
||||
catch(DbEntityValidationException ex)
|
||||
{
|
||||
foreach (var errors in ex.EntityValidationErrors)
|
||||
{
|
||||
foreach (var validationError in errors.ValidationErrors)
|
||||
{
|
||||
// get the error message
|
||||
string errorMessage = validationError.ErrorMessage;
|
||||
Console.WriteLine(errorMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
context.Movies.Add(new Movie()
|
||||
{
|
||||
Name = "Movie 1",
|
||||
ProductionTime = DateTime.Now,
|
||||
WatchedByUsers = new List<ApplicationUser>() { user }
|
||||
//StarringActors = new List<Actor>() { new Actor() { FirstName = "Bob", LastName = "Brown" } }
|
||||
});
|
||||
context.SaveChanges();
|
||||
// This method will be called after migrating to the latest version.
|
||||
|
||||
// You can use the DbSet<T>.AddOrUpdate() helper extension method
|
||||
|
@ -1,5 +1,6 @@
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Data.Entity;
|
||||
using System.Security.Claims;
|
||||
@ -10,6 +11,7 @@ namespace MovieBase.Models
|
||||
// You can add profile data for the user by adding more properties to your ApplicationUser class, please visit https://go.microsoft.com/fwlink/?LinkID=317594 to learn more.
|
||||
public class ApplicationUser : IdentityUser
|
||||
{
|
||||
public List<Movie> WatchedMovies { get; set; }
|
||||
public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager)
|
||||
{
|
||||
// Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
|
||||
@ -22,7 +24,7 @@ namespace MovieBase.Models
|
||||
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
|
||||
{
|
||||
public DbSet<Movie> Movies { get; set; }
|
||||
public DbSet<Actor> Actors { get; set; }
|
||||
//public DbSet<Actor> Actors { get; set; }
|
||||
|
||||
public ApplicationDbContext()
|
||||
: base("DefaultConnection", throwIfV1Schema: false)
|
||||
@ -37,12 +39,13 @@ namespace MovieBase.Models
|
||||
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<Movie>().Property(x => x.MovieId).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
|
||||
modelBuilder.Entity<Actor>().Property(x => x.ActorId).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
|
||||
//modelBuilder.Entity<Actor>().Property(x => x.ActorId).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
|
||||
|
||||
modelBuilder.Entity<Movie>().HasKey(movie => movie.MovieId);
|
||||
modelBuilder.Entity<Actor>().HasKey(actor => actor.ActorId);
|
||||
//modelBuilder.Entity<Actor>().HasKey(actor => actor.ActorId);
|
||||
|
||||
modelBuilder.Entity<Movie>().HasMany(movie => movie.StarringActors).WithMany(actor => actor.Movies);
|
||||
//modelBuilder.Entity<Movie>().HasMany(movie => movie.StarringActors).WithMany(actor => actor.Movies);
|
||||
modelBuilder.Entity<ApplicationUser>().HasMany(user => user.WatchedMovies).WithMany(movie => movie.WatchedByUsers);
|
||||
base.OnModelCreating(modelBuilder);
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ namespace MovieBase.Models
|
||||
public Guid MovieId { get; private set; }
|
||||
public string Name { get; set; }
|
||||
public DateTime ProductionTime { get; set; }
|
||||
public List<Actor> StarringActors { get; set; }
|
||||
//public List<Actor> StarringActors { get; set; }
|
||||
public List<ApplicationUser> WatchedByUsers { get; set; }
|
||||
}
|
||||
}
|
@ -46,15 +46,30 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="PagedList, Version=1.17.0.0, Culture=neutral, PublicKeyToken=abbb863e9397c5e1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\PagedList.1.17.0.0\lib\net40\PagedList.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PagedList.Mvc, Version=4.5.0.0, Culture=neutral, PublicKeyToken=abbb863e9397c5e1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\PagedList.Mvc.4.5.0.0\lib\net40\PagedList.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.Owin, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Owin.5.2.7\lib\net45\System.Web.Http.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
@ -167,6 +182,7 @@
|
||||
<Compile Include="App_Start\IdentityConfig.cs" />
|
||||
<Compile Include="App_Start\RouteConfig.cs" />
|
||||
<Compile Include="App_Start\Startup.Auth.cs" />
|
||||
<Content Include="Content\PagedList.css" />
|
||||
<Compile Include="Controllers\AccountController.cs" />
|
||||
<Compile Include="Controllers\HomeController.cs" />
|
||||
<Compile Include="Controllers\ManageController.cs" />
|
||||
@ -182,6 +198,18 @@
|
||||
<Compile Include="Migrations\201905041114276_s.Designer.cs">
|
||||
<DependentUpon>201905041114276_s.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\201905041159055_add data.cs" />
|
||||
<Compile Include="Migrations\201905041159055_add data.Designer.cs">
|
||||
<DependentUpon>201905041159055_add data.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\201905041523391_user watce.cs" />
|
||||
<Compile Include="Migrations\201905041523391_user watce.Designer.cs">
|
||||
<DependentUpon>201905041523391_user watce.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\201905041602074_adin.cs" />
|
||||
<Compile Include="Migrations\201905041602074_adin.Designer.cs">
|
||||
<DependentUpon>201905041602074_adin.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\Configuration.cs" />
|
||||
<Compile Include="Models\AccountViewModels.cs" />
|
||||
<Compile Include="Models\Actor.cs" />
|
||||
@ -248,10 +276,10 @@
|
||||
<Content Include="Views\Manage\VerifyPhoneNumber.cshtml" />
|
||||
<Content Include="Views\Shared\Lockout.cshtml" />
|
||||
<Content Include="Views\Shared\_LoginPartial.cshtml" />
|
||||
<Content Include="Views\Movie\Index.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
<Folder Include="Views\Movie\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="fonts\glyphicons-halflings-regular.woff2" />
|
||||
@ -273,6 +301,15 @@
|
||||
<EmbeddedResource Include="Migrations\201905041114276_s.resx">
|
||||
<DependentUpon>201905041114276_s.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\201905041159055_add data.resx">
|
||||
<DependentUpon>201905041159055_add data.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\201905041523391_user watce.resx">
|
||||
<DependentUpon>201905041523391_user watce.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\201905041602074_adin.resx">
|
||||
<DependentUpon>201905041602074_adin.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
|
38
MovieBase/Views/Movie/Index.cshtml
Normal file
38
MovieBase/Views/Movie/Index.cshtml
Normal file
@ -0,0 +1,38 @@
|
||||
@model PagedList.IPagedList<MovieBase.Models.Movie>
|
||||
@using PagedList.Mvc;
|
||||
|
||||
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Movies";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<h2>Movies</h2>
|
||||
|
||||
@using (Html.BeginForm("Imdb", "Movie", FormMethod.Get))
|
||||
{
|
||||
<p>
|
||||
Find by movie name: @Html.TextBox("MovieName")
|
||||
<input type="submit" value="Search" />
|
||||
</p>
|
||||
}
|
||||
|
||||
<table class="table">
|
||||
|
||||
@foreach (var movie in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelMovie => movie.MovieId)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelMovie => movie.Name)
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<br />
|
||||
Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount
|
||||
@Html.PagedListPager(Model, page => Url.Action("Index", new { page }))
|
@ -24,6 +24,7 @@
|
||||
<li>@Html.ActionLink("Home", "Index", "Home")</li>
|
||||
<li>@Html.ActionLink("About", "About", "Home")</li>
|
||||
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
|
||||
<li>@Html.ActionLink("Movie", "Index", "Movie")</li>
|
||||
</ul>
|
||||
@Html.Partial("_LoginPartial")
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
For more information on how to configure your ASP.NET application, please visit
|
||||
https://go.microsoft.com/fwlink/?LinkId=301880
|
||||
@ -6,9 +6,7 @@
|
||||
<configuration>
|
||||
<configSections>
|
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||
<section name="entityFramework"
|
||||
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
|
||||
requirePermission="false"/>
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</configSections>
|
||||
<connectionStrings configSource="connections.config" />
|
||||
<appSettings>
|
||||
@ -26,7 +24,12 @@
|
||||
<modules>
|
||||
<remove name="FormsAuthentication" />
|
||||
</modules>
|
||||
</system.webServer>
|
||||
<handlers>
|
||||
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
|
||||
<remove name="OPTIONSVerbHandler" />
|
||||
<remove name="TRACEVerbHandler" />
|
||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
</handlers></system.webServer>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
@ -87,12 +90,8 @@
|
||||
</entityFramework>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs"
|
||||
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
|
||||
warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701"/>
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
|
||||
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
|
||||
warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+"/>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
</configuration>
|
@ -11,6 +11,9 @@
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.4" targetFramework="net462" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.4" targetFramework="net462" />
|
||||
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net462" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net462" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net462" />
|
||||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.7" targetFramework="net462" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.4" targetFramework="net462" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.4" targetFramework="net462" />
|
||||
@ -27,5 +30,7 @@
|
||||
<package id="Modernizr" version="2.8.3" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="11.0.1" targetFramework="net462" />
|
||||
<package id="Owin" version="1.0" targetFramework="net462" />
|
||||
<package id="PagedList" version="1.17.0.0" targetFramework="net462" />
|
||||
<package id="PagedList.Mvc" version="4.5.0.0" targetFramework="net462" />
|
||||
<package id="WebGrease" version="1.6.0" targetFramework="net462" />
|
||||
</packages>
|
Loading…
Reference in New Issue
Block a user