EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

时间:2021-09-20 15:03:19

在以前的教程你曾与一个简单的数据模型,由三个实体组成。在本教程中,您将添加更多的实体和关系,并通过指定格式、 验证和数据库映射规则,您将自定义数据模型。你会看到自定义的数据模型的两种方式: 通过添加属性,实体类并通过将代码添加到数据库上下文类。

当您完成时,实体类将已完成的数据模型中,如下图所示:

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

通过使用属性进行自定义的数据模型

在本节中,您会看到如何通过使用指定的格式,验证和数据库映射规则的属性来自定义数据模型。然后在以下各节,您将创建的几个完整的School数据模型,通过添加属性的类已创建,并在模型中创建新的类,其余的实体类型。

数据类型属性

对于学生入学日期,所有 web 页当前显示的时间以及日期,虽然所有你关心为此字段是日期。通过使用数据批注属性,可以让一个代码将修复中每个视图用于显示数据的显示格式的更改。若要查看示例如何去做你会将属性添加到Student班级中的EnrollmentDate属性。

Models\Student.cs,添加System.ComponentModel.DataAnnotations命名空间的using语句和DataTypeDisplayFormat属性添加的EnrollmentDate属性,如下面的示例所示:

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; namespace ContosoUniversity.Models
{
public class Student
{
public int StudentID { get; set; }
public string LastName { get; set; }
public string FirstMidName { get; set; } [DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
public DateTime EnrollmentDate { get; set; } public virtual ICollection<Enrollment> Enrollments { get; set; }
}
}

数据类型属性用来指定比数据库内部类型更加具体的数据类型。在这种情况下,我们只想要跟踪的日期,不是日期和时间。数据类型枚举提供多种数据类型例如日期、 时间、 电话号码、 货币、 电子邮件地址和更多。DataType属性,还可以启用应用程序以自动提供特定于类型的功能。例如, mailto:DataType.EmailAddress,可以创建链接和一个日期选择器可供DataType.Date支持HTML5的浏览器。数据类型属性发出 HTML 5 的浏览器能理解的 HTML 5数据-(发音为数据短划线) 属性。数据类型属性不提供任何验证。

DataType.Date不指定显示日期的格式。默认情况下,根据基于服务器的CultureInfo的默认格式显示的数据字段.

DisplayFormat属性用于显式指定的日期格式:

[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
public DateTime EnrollmentDate { get; set; }

ApplyFormatInEditMode设置指定的值显示在文本框中进行编辑时,应该也适用已指定的格式。(您可能不希望一些领域 — — 例如,对于货币值,您可能不希望货币符号在文本框中编辑。)

你可以使用DisplayFormat属性本身,但它通常是一个好的主意,也使用该数据类型的属性。DataType属性传递语义的而不是如何呈现在屏幕上,数据和提供以下好处,你不要跟DisplayFormat:

  • 浏览器可以启用 HTML5 功能 (例如,显示一个日历控件、 适当的区域设置的货币符号、 电子邮件的链接等。)。
  • 默认情况下,浏览器将呈现使用基于您的区域设置的正确格式的数据.
  • 数据类型属性可以启用 MVC 选择权字段模板来呈现的数据 (如果使用了DisplayFormat使用字符串模板)。有关详细信息,请参阅布拉德 · Wilson ASP.NET MVC 2 模板。(虽然为 MVC 2 写,这篇文章仍适用于当前版本的 ASP.NET MVC。)

如果您使用日期字段的DataType属性,您必须也指定 DisplayFormat属性,以确保该字段在 Chrome 浏览器中都能正确呈现。更多的信息,请参阅此计算器线程.

再次运行学生索引页,并注意时间将不再显示在注册日期。同样会适用于任何使用Student 模型的视图。

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

StringLengthAttribute

您还可以指定数据验证规则并使用属性的消息。假设您想要确保用户不输入超过 50 个字符的名称。若要添加此限制,请将StringLength属性添加到LastNameFirstMidName的属性,如下面的示例所示:

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; namespace ContosoUniversity.Models
{
public class Student
{
public int StudentID { get; set; }
[StringLength(50)]
public string LastName { get; set; }
[StringLength(50, ErrorMessage = "First name cannot be longer than 50 characters.")]
public string FirstMidName { get; set; }
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
public DateTime EnrollmentDate { get; set; } public virtual ICollection<Enrollment> Enrollments { get; set; }
}
}

StringLength属性不会防止用户空白输入一个名称。可以使用正则表达式属性应用到输入的限制。例如,下面的代码需要的第一个字符是大写,将其余的字符,要按字母顺序排列:

[RegularExpression(@"^[A-Z]+[a-zA-Z''-'\s]*$")]

MaxLength属性提供类似的功能,到StringLength属性,但不提供客户端验证。

运行应用程序并单击学生选项卡。您收到以下错误:

自创建数据库,支持 'SchoolContext' 上下文模型已更改。请考虑使用代码第一次迁移来更新数据库 (http://go.microsoft.com/fwlink/?LinkId=238269).

数据库模型已更改,必须在数据库架构中,改变的方式,实体框架检测到。您将使用迁移来更新架构,而不会丢失任何数据,您添加到数据库中使用的 UI。如果您更改由Seed方法创建的数据,这将更改回其原始状态的AddOrUpdate方法,您使用Seed 法。(AddOrUpdate是等同于"upsert"操作从数据库术语。

在程序包管理器控制台 (PMC) 中,输入以下命令:

一个dd-migration MaxLengthOnNames
update-database

add-migration MaxLengthOnNames命令创建一个名为< 时间戳 > _MaxLengthOnNames.cs文件。此文件包含将更新数据库,以匹配当前的数据模型的代码。实体框架规定为迁移文件名称预先使用的时间戳用于命令迁移的方法。如果您删除数据库,创建多个迁移后或使用迁移部署项目,所有的迁移应用他们被创建的顺序。

运行创建页上,并输入任一超过 50 个字符的名称。只要你超过 50 个字符,客户端验证可以立即显示一条错误消息。

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

列属性

此外可以使用属性来控制如何将您的类和属性映射到数据库。假设您已经使用名称FirstMidName为第一个名称字段,因为该字段可能还包含一个中间名。但你想要的数据库列被命名为FirstName,因为将会写对数据库的临时查询的用户已经习惯了这个名字。若要使这种映射,可以使用Column属性。

Column属性指定当创建数据库时,映射到FirstMidName属性的Student表中的列将被命名为FirstName。换句话说,当您的代码引用Student.FirstMidName,数据将来自或在Student表的FirstName列中进行更新。如果您不指定列名称,则会给属性名称相同的名称。

添加一条 using 声明为System.ComponentModel.DataAnnotations.Schema和列名称归因于FirstMidName属性中,以下突出显示的代码所示:

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; namespace ContosoUniversity.Models
{
public class Student
{
public int StudentID { get; set; }
[StringLength(50)]
public string LastName { get; set; }
[StringLength(50, ErrorMessage = "First name cannot be longer than 50 characters.")]
[Column("FirstName")]
public string FirstMidName { get; set; }
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
public DateTime EnrollmentDate { get; set; } public virtual ICollection<Enrollment> Enrollments { get; set; }
}
}

如何添加列属性更改支持 SchoolContext,所以它不会匹配数据库的模型。在 PMC 打造另一次迁移中输入以下命令:

add-migration ColumnFirstName
update-database

服务器资源管理器数据库资源管理器如果您正在使用 Web 快递),双击的学生表。

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

下图显示了原始的列名称,它正如你在应用前两个迁移之前。除了从FirstMidName 更改为FirstName列名称,两个名称列已从MAX 长度为 50 个字符。

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

此外可以使数据库映射更改使用Fluent API,您将看到在本教程后面。

如果你尝试编译在您完成所有这些实体类的创建之前,你可能会得到编译器错误。

创建讲师实体

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

创建Models\Instructor.cs,模板代码替换为以下代码:

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; namespace ContosoUniversity.Models
{
public class Instructor
{
public int InstructorID { get; set; } [Required]
[Display(Name = "Last Name")]
[StringLength(50)]
public string LastName { get; set; } [Required]
[Column("FirstName")]
[Display(Name = "First Name")]
[StringLength(50)]
public string FirstMidName { get; set; } [DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
[Display(Name = "Hire Date")]
public DateTime HireDate { get; set; } public string FullName
{
get { return LastName + ", " + FirstMidName; }
} public virtual ICollection<Course> Courses { get; set; }
public virtual OfficeAssignment OfficeAssignment { get; set; }
}
}

请注意的几个属性都是相同的StudentInstructor的实体。在本系列中的晚些时候实施继承教程中,您将重构使用继承来消除这种冗余。

所需和显示属性

LastName属性上的属性指定它是必填的字段,文本框中的标题应该"Last Name"(而不是属性名称,它将"姓氏"与没有空格),和值不能超过 50 个字符。

[Required]
[Display(Name="Last Name")]
[StringLength(50)]
public string LastName { get; set; }

StringLength 属性在数据库中设置的最大长度,并提供客户端和服务器端验证的 ASP.NET MVC。您还可以在此属性中,指定最大字符串长度,但最小值对数据库架构没有任何影响。所需属性双,不需要对值类型 (如 int 的日期时间和浮动。值类型不能分配 null 值,所以他们都是内在要求。你可以移除的所需属性,并替换为StringLength属性的最小长度参数:

      [Display(Name = "Last Name")]
[StringLength(50, MinimumLength=1)]
public string LastName { get; set; }

你可以在一行上,把多个属性,所以你也可以写教练类,如下所示:

public class Instructor
{
public int InstructorID { get; set; } [Display(Name = "Last Name"),StringLength(50, MinimumLength=1)]
public string LastName { get; set; } [Column("FirstName"),Display(Name = "First Name"),StringLength(50, MinimumLength=1)]
public string FirstMidName { get; set; } [DataType(DataType.Date),Display(Name = "Hire Date"),DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
public DateTime HireDate { get; set; } public string FullName
{
get { return LastName + ", " + FirstMidName; }
} public virtual ICollection<Course> Courses { get; set; }
public virtual OfficeAssignment OfficeAssignment { get; set; }
}

FullName 计算属性

FullName是一个计算的属性,返回一个值,通过串联两个其他属性创建。因此,只有get访问器,并将在数据库中生成没有FullName列。

public string FullName
{
get { return LastName + ", " + FirstMidName; }
}

课程和 OfficeAssignment 导航属性

CoursesOfficeAssignment是导航属性。正如我较早前解释,他们通常定义为虚拟以便他们可以利用实体框架功能叫做延迟加载。此外,如果一个导航属性可以容纳多个实体,其类型必须实现ICollection < T >接口。(例如IList < T >资格但不是IEnumerable < T >因为IEnumerable<T>不实现添加.

教练可以教任意数量的课程,使Courses定义为Course实体的集合。我们的业务规则国家教练只能有顶多一个办事处,所以OfficeAssignment定义为一个单一的OfficeAssignment实体 (这可能为null ,如果没有办公室分配)。

public virtual ICollection<Course> Courses { get; set; }
public virtual OfficeAssignment OfficeAssignment { get; set; }

创建 OfficeAssignment 实体

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

用下面的代码创建Models\OfficeAssignment.cs :

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; namespace ContosoUniversity.Models
{
public class OfficeAssignment
{
[Key]
[ForeignKey("Instructor")]
public int InstructorID { get; set; }
[StringLength(50)]
[Display(Name = "Office Location")]
public string Location { get; set; } public virtual Instructor Instructor { get; set; }
}
}

生成项目时,保存您的更改并验证你没有做出任何复制并粘贴了编译器可以捕捉的错误。

键属性

还有一个为零或一个InstructorOfficeAssignment实体之间的关系。分配到办公室只存在着它的分配对象、 讲师,因此其主键也是其Instructor实体的外键。但实体框架因为它的名字并不遵循ID或命名约定的ID自动无法识别InstructorID为此实体的主键。因此, Key属性用于识别的关键:

[Key]
[ForeignKey("Instructor")]
public int InstructorID { get; set; }

如果该实体有其自身的主键,但您想要有别于classnameIDID名称的属性,还可以使用 Key属性。默认情况下 EF 作为非数据库生成对待关键,因为该列是用来标识的关系。

外键属性

当一个到零或一个关系或一对一关系两个实体 (如OfficeAssignment Instructor之间),EF 不出来哪一端的关系是主体,哪一端是依赖。一对一关系到其他类每个班有引用导航属性。外键属性可以应用于所依赖的类来建立关系。如果您省略外键属性,您会收到以下错误,当您尝试创建迁移:

无法确定主要年底 'ContosoUniversity.Models.OfficeAssignment' 和 'ContosoUniversity.Models.Instructor' 类型之间的关联。本协会主要年底必须显式配置使用关系 fluent API 或数据注释。

稍后在本教程中我们将展示如何使用 fluent API 配置这种关系。

指导员导航属性

Instructor实体具有一个可以为 null 的OfficeAssignment导航属性 (因为教练可能没有分配到办公室),和OfficeAssignment实体具有非可以为 null 的Instructor导航属性 (因为分配到办公室离不开教练 — —InstructorID为非 null 值)。当Instructor实体具有OfficeAssignment的相关的实体时,每个实体将具有到另一个在它的导航属性的引用。

你可以把 [Required]的属性对教练导航属性来指定必须有一个相关的教练,但你不必这样做,因为 InstructorID 键 (这也是此表的键) 可以为非空。

修改课程实体

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

Models\Course.cs,替换您添加的代码早些时候用下面的代码:

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; namespace ContosoUniversity.Models
{
public class Course
{
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[Display(Name = "Number")]
public int CourseID { get; set; } [StringLength(50, MinimumLength = 3)]
public string Title { get; set; } [Range(0, 5)]
public int Credits { get; set; } [Display(Name = "Department")]
public int DepartmentID { get; set; } public virtual Department Department { get; set; }
public virtual ICollection<Enrollment> Enrollments { get; set; }
public virtual ICollection<Instructor> Instructors { get; set; }
}
}

课程实体具有外键属性指向相关Department实体的DepartmentID ,它有一个Department导航属性。实体框架并不要求您向您的数据模型中添加外键属性,当你有一个相关的实体的导航属性。EF 会自动在数据库中创建外键,需要他们的地方。但有数据模型中的外键能使更新,更简单、 更高效。例如,当您读取一个课程实体来编辑,Department实体为空如果不加载它,所以当你更新课程的实体,你要首先取各Department实体。当外键属性DepartmentID包含在数据模型中时,你不需要去取各Department实体进行更新之前。

DatabaseGenerated 属性

具有上的CourseID属性参数的DatabaseGenerated 属性指定的主键值都是由用户提供,而不是由数据库生成。

[DatabaseGenerated(DatabaseGeneratedOption.None)]
[Display(Name = "Number")]
public int CourseID { get; set; }

默认情况下,实体框架假定由数据库生成的主键值。这是你想在大多数情况下。然而,对于Course的实体,你会为一个部门,2000年系列的另一个部门,使用用户指定的课程号,如 1000年系列,等等。

外键和导航属性

外键属性和Course实体的导航属性反映了以下关系:

  • 一门课程被分配到一个部门,因此DepartmentID键和Department导航属性为上文所述的原因。
    public int DepartmentID { get; set; }
    public virtual Department Department { get; set; }
  • 当然可以有任意数量的学生入学,所以Enrollments导航属性是一个集合:
    public virtual ICollection<Enrollment> Enrollments { get; set; }
  • 可能由多个教师,教一门课程,所以Instructors导航属性是一个集合:
    public virtual ICollection<Instructor> Instructors { get; set; }

创建部门实体

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

用下面的代码创建Models\Department.cs 

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; namespace ContosoUniversity.Models
{
public class Department
{
public int DepartmentID { get; set; } [StringLength(50, MinimumLength=3)]
public string Name { get; set; } [DataType(DataType.Currency)]
[Column(TypeName = "money")]
public decimal Budget { get; set; } [DataType(DataType.Date)]
public DateTime StartDate { get; set; } [Display(Name = "Administrator")]
public int? InstructorID { get; set; } public virtual Instructor Administrator { get; set; }
public virtual ICollection<Course> Courses { get; set; }
}
}

列属性

早些时候你用列属性来更改列名称映射。在各Department实体的代码,将Column属性是被用于更改 SQL 数据类型映射,以便将在数据库中使用 SQL Server money类型定义的列:

[Column(TypeName="money")]
public decimal Budget { get; set; }

列映射通常是不必需的因为实体框架通常选择适当的 SQL Server 数据类型基于您定义的属性的 CLR 类型。CLRdecimal类型映射到 SQL Server 的decimal类型。但在这种情况下,你知道列将持有货币金额和货币数据类型是更合适的。

外键和导航属性

外键和导航属性反映以下关系:

  • 一个部门可能有也可能不是管理员,并且管理员总是教练。因此InstructorID属性是作为Instructor的实体,将外键包含和int类型指定要标记为可为空属性后添加一个问号。导航属性被命名为Administrator,但持有Instructor实体:
    public int? InstructorID { get; set; }
    public virtual Instructor Administrator { get; set; }
  • 阿部可能有很多的课程,所以Courses导航属性:
    public virtual ICollection<Course> Courses { get; set; }

按照约定,实体框架启用级联删除非可以为 null 的外键和多对多关系。这可以导致循环的级联删除规则,当您初始值设定项的代码运行时,将导致引发异常。例如,如果您没有将Department.InstructorID属性定义为可以为 null,您将得到下面的异常消息,初始值设定项运行时:"引用关系将导致一个周期性的参考,不允许的"。如果您的业务规则需要作为非可以为 null 的InstructorID属性,您将必须使用以下 fluent API 来禁用级联删除的关系:

modelBuilder.Entity().HasRequired(d => d.Administrator).WithMany().WillCascadeOnDelete(false);

修改学生实体

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

Models\Student.cs,替换的代码添加早些时候用下面的代码。突出显示所做的更改。

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; namespace ContosoUniversity.Models
{
public class Student
{
public int StudentID { get; set; } [StringLength(50, MinimumLength = 1)]
public string LastName { get; set; } [StringLength(50, MinimumLength = 1, ErrorMessage = "First name cannot be longer than 50 characters.")]
[Column("FirstName")]
public string FirstMidName { get; set; } [DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
[Display(Name = "Enrollment Date")]
public DateTime EnrollmentDate { get; set; } public string FullName
{
get { return LastName + ", " + FirstMidName; }
} public virtual ICollection<Enrollment> Enrollments { get; set; }
}
}

注册实体

Models\Enrollment.cs,替换的代码添加早些时候用下面的代码

using System.ComponentModel.DataAnnotations;

namespace ContosoUniversity.Models
{
public enum Grade
{
A, B, C, D, F
} public class Enrollment
{
public int EnrollmentID { get; set; }
public int CourseID { get; set; }
public int StudentID { get; set; } [DisplayFormat(NullDisplayText = "No grade")]
public Grade? Grade { get; set; } public virtual Course Course { get; set; }
public virtual Student Student { get; set; }
}
}

外键和导航属性

外键属性和导航属性反映了以下关系:

  • 注册记录是为一个单一的课程,所以CourseID的外键属性和Course导航属性:
    public int CourseID { get; set; }
    public virtual Course Course { get; set; }
  • 注册记录是一个单一的学生,所以有StudentID的外键属性和Student导航属性:
    public int StudentID { get; set; }
    public virtual Student Student { get; set; }

多对多关系

有的StudentCourse的实体,与Enrollment实体职能作为多多联接表与有效载荷在数据库中的多对多关系。这意味着Enrollment表包含附加数据除了 (在这种情况下,主键和某一Grade楼盘) 联接的表的外键。

下面的插图显示这些关系在实体关系图的外观。(此关系图使用实体框架电动工具生成 ; 创建关系图不是本教程的一部分,它只是被用在这里作为例证。)

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

每个关系线条上,另一个,指示一个一对多关系具有 1 在一结束就和一个星号 (*)。

如果Enrollment表不包含等级的信息,它只需要包含CourseIDStudentID的两个外键。在这种情况下,它将对应于多多联接表没有有效载荷(或纯联接表) 在数据库中,和你不必在所有为它创建一个模型类。InstructorCourse的实体都有那种多对多关系,并且正如你所看到的所以两者是没有实体类:

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

联接表需要在数据库中,但是,如下面的数据库关系图中所示:

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

实体框架会自动创建CourseInstructor表中,和您读取和更新它间接地通过读取和更新的Instructor.CoursesCourse.Instructors的导航属性。

实体关系图中显示关系

下面的插图显示的关系图中为已完成的学校模型创建实体框架电动工具。

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

除了多对多关系线 (* 到 *) 和一个一对多关系线 (1 到 *),这里您可以看到一个为零或一个关系线 (1 到 0..1) 之间的InstructorOfficeAssignment的实体和零-或--一对多关系线 (0..1 到 *)讲师和部门实体之间。

通过将代码添加到数据库上下文中自定义数据模型

接下来您将添加到SchoolContext新的实体类和自定义一些使用fluent API调用的映射。(API 是"流利",因为它常常被串在一起成单个语句的方法调用一系列。)

在本教程中,您将使用 fluent API 只为你不能做与属性的数据库映射。然而,您还可以使用 fluent API 以指定的格式、 验证和你可以通过使用属性的映射规则大部分。一些属性,例如MinimumLength不能用 fluent API。正如前面提到的MinimumLength 并不更改架构,它仅适用于客户端和服务器端验证规则

一些开发商更愿意使用 fluent API 完全,使得他们可以保持他们的实体类"干净"。如果你想要而且只能通过使用 fluent API 的几个自定义设置,您可以混合属性和 fluent API,但在一般情况下建议的做法是选择这两种方法之一来使用一贯尽可能多地。

要向其中添加新的实体数据模型并执行数据库的映射,您没有通过使用属性,请将DAL\SchoolContext.cs中的代码替换下面的代码:

using ContosoUniversity.Models;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions; namespace ContosoUniversity.DAL
{
public class SchoolContext : DbContext
{
public DbSet<Course> Courses { get; set; }
public DbSet<Department> Departments { get; set; }
public DbSet<Enrollment> Enrollments { get; set; }
public DbSet<Instructor> Instructors { get; set; }
public DbSet<Student> Students { get; set; }
public DbSet<OfficeAssignment> OfficeAssignments { get; set; } protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Conventions.Remove<PluralizingTableNameConvention>(); modelBuilder.Entity<Course>()
.HasMany(c => c.Instructors).WithMany(i => i.Courses)
.Map(t => t.MapLeftKey("CourseID")
.MapRightKey("InstructorID")
.ToTable("CourseInstructor"));
}
}
}

OnModelCreating方法中新的语句配置多多联接表:

  • InstructorCourse实体之间的多对多关系,该代码指定联接表的表和列名称。代码首先可以配置的多对多关系对你来说没有该代码,但如果你不叫它,您将获得InstructorID列的默认名称,如InstructorInstructorID 。

    modelBuilder.Entity<Course>()
    .HasMany(c => c.Instructors).WithMany(i => i.Courses)
    .Map(t => t.MapLeftKey("CourseID")
    .MapRightKey("InstructorID")
    .ToTable("CourseInstructor"));

下面的代码提供的如何你可以有使用 fluent API 而不是属性来指定InstructorOfficeAssignment的实体之间的关系的示例:

modelBuilder.Entity<Instructor>()
.HasOptional(p => p.OfficeAssignment).WithRequired(p => p.Instructor);

关于"fluent API"语句在幕后做什么的信息,请参阅Fluent API的博客文章。

具有测试数据的数据库

Migrations\Configuration.cs文件中的代码替换下面的代码,以便为您创建新的实体提供测试数据。

namespace ContosoUniversity.Migrations
{
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
using ContosoUniversity.Models;
using ContosoUniversity.DAL; internal sealed class Configuration : DbMigrationsConfiguration<SchoolContext>
{
public Configuration()
{
AutomaticMigrationsEnabled = false;
} protected override void Seed(SchoolContext context)
{
var students = new List<Student>
{
new Student { FirstMidName = "Carson", LastName = "Alexander",
EnrollmentDate = DateTime.Parse("2010-09-01") },
new Student { FirstMidName = "Meredith", LastName = "Alonso",
EnrollmentDate = DateTime.Parse("2012-09-01") },
new Student { FirstMidName = "Arturo", LastName = "Anand",
EnrollmentDate = DateTime.Parse("2013-09-01") },
new Student { FirstMidName = "Gytis", LastName = "Barzdukas",
EnrollmentDate = DateTime.Parse("2012-09-01") },
new Student { FirstMidName = "Yan", LastName = "Li",
EnrollmentDate = DateTime.Parse("2012-09-01") },
new Student { FirstMidName = "Peggy", LastName = "Justice",
EnrollmentDate = DateTime.Parse("2011-09-01") },
new Student { FirstMidName = "Laura", LastName = "Norman",
EnrollmentDate = DateTime.Parse("2013-09-01") },
new Student { FirstMidName = "Nino", LastName = "Olivetto",
EnrollmentDate = DateTime.Parse("2005-09-01") }
}; students.ForEach(s => context.Students.AddOrUpdate(p => p.LastName, s));
context.SaveChanges(); var instructors = new List<Instructor>
{
new Instructor { FirstMidName = "Kim", LastName = "Abercrombie",
HireDate = DateTime.Parse("1995-03-11") },
new Instructor { FirstMidName = "Fadi", LastName = "Fakhouri",
HireDate = DateTime.Parse("2002-07-06") },
new Instructor { FirstMidName = "Roger", LastName = "Harui",HireDate=DateTime.Parse("1998-07-01")},newInstructor{FirstMidName="Candace",LastName="Kapoor",HireDate=DateTime.Parse("2001-01-15")},newInstructor{FirstMidName="Roger",LastName="Zheng",HireDate=DateTime.Parse("2004-02-12")}};
instructors.ForEach(s => context.Instructors.AddOrUpdate(p => p.LastName, s));
context.SaveChanges();var departments =newList<Department>{newDepartment{Name="English",Budget=350000,StartDate=DateTime.Parse("2007-09-01"),InstructorID= instructors.Single( i => i.LastName=="Abercrombie").InstructorID},newDepartment{Name="Mathematics",Budget=100000,StartDate=DateTime.Parse("2007-09-01"),InstructorID= instructors.Single( i => i.LastName=="Fakhouri").InstructorID},newDepartment{Name="Engineering",Budget=350000,StartDate=DateTime.Parse("2007-09-01"),InstructorID= instructors.Single( i => i.LastName=="Harui").InstructorID},newDepartment{Name="Economics",Budget=100000,StartDate=DateTime.Parse("2007-09-01"),InstructorID= instructors.Single( i => i.LastName=="Kapoor").InstructorID}};
departments.ForEach(s => context.Departments.AddOrUpdate(p => p.Name, s));
context.SaveChanges();var courses =newList<Course>{newCourse{CourseID=1050,Title="Chemistry",Credits=3,DepartmentID= departments.Single( s => s.Name=="Engineering").DepartmentID,Instructors=newList<Instructor>()},newCourse{CourseID=4022,Title="Microeconomics",Credits=3,DepartmentID= departments.Single( s => s.Name=="Economics").DepartmentID,Instructors=newList<Instructor>()},newCourse{CourseID=4041,Title="Macroeconomics",Credits=3,DepartmentID= departments.Single( s => s.Name=="Economics").DepartmentID,Instructors=newList<Instructor>()},newCourse{CourseID=1045,Title="Calculus",Credits=4,DepartmentID= departments.Single( s => s.Name=="Mathematics").DepartmentID,Instructors=newList<Instructor>()},newCourse{CourseID=3141,Title="Trigonometry",Credits=4,DepartmentID= departments.Single( s => s.Name=="Mathematics").DepartmentID,Instructors=newList<Instructor>()},newCourse{CourseID=2021,Title="Composition",Credits=3,DepartmentID= departments.Single( s => s.Name=="English").DepartmentID,Instructors=newList<Instructor>()},newCourse{CourseID=2042,Title="Literature",Credits=4,DepartmentID= departments.Single( s => s.Name=="English").DepartmentID,Instructors=newList<Instructor>()},};
courses.ForEach(s => context.Courses.AddOrUpdate(p => p.CourseID, s));
context.SaveChanges();var officeAssignments =newList<OfficeAssignment>{newOfficeAssignment{InstructorID= instructors.Single( i => i.LastName=="Fakhouri").InstructorID,Location="Smith 17"},newOfficeAssignment{InstructorID= instructors.Single( i => i.LastName=="Harui").InstructorID,Location="Gowan 27"},newOfficeAssignment{InstructorID= instructors.Single( i => i.LastName=="Kapoor").InstructorID,Location="Thompson 304"},};
officeAssignments.ForEach(s => context.OfficeAssignments.AddOrUpdate(p => p.Location, s));
context.SaveChanges();AddOrUpdateInstructor(context,"Chemistry","Kapoor");AddOrUpdateInstructor(context,"Chemistry","Harui");AddOrUpdateInstructor(context,"Microeconomics","Zheng");AddOrUpdateInstructor(context,"Macroeconomics","Zheng");AddOrUpdateInstructor(context,"Calculus","Fakhouri");AddOrUpdateInstructor(context,"Trigonometry","Harui");AddOrUpdateInstructor(context,"Composition","Abercrombie");AddOrUpdateInstructor(context,"Literature","Abercrombie"); context.SaveChanges();var enrollments =newList<Enrollment>{newEnrollment{StudentID= students.Single(s => s.LastName=="Alexander").StudentID,CourseID= courses.Single(c => c.Title=="Chemistry").CourseID,Grade=Grade.A
},newEnrollment{StudentID= students.Single(s => s.LastName=="Alexander").StudentID,CourseID= courses.Single(c => c.Title=="Microeconomics").CourseID,Grade=Grade.C
},newEnrollment{StudentID= students.Single(s => s.LastName=="Alexander").StudentID,CourseID= courses.Single(c => c.Title=="Macroeconomics").CourseID,Grade=Grade.B
},newEnrollment{StudentID= students.Single(s => s.LastName=="Alonso").StudentID,CourseID= courses.Single(c => c.Title=="Calculus").CourseID,Grade=Grade.B
},newEnrollment{StudentID= students.Single(s => s.LastName=="Alonso").StudentID,CourseID= courses.Single(c => c.Title=="Trigonometry").CourseID,Grade=Grade.B
},newEnrollment{StudentID= students.Single(s => s.LastName=="Alonso").StudentID,CourseID= courses.Single(c => c.Title=="Composition").CourseID,Grade=Grade.B
},newEnrollment{StudentID= students.Single(s => s.LastName=="Anand").StudentID,CourseID= courses.Single(c => c.Title=="Chemistry").CourseID},newEnrollment{StudentID= students.Single(s => s.LastName=="Anand").StudentID,CourseID= courses.Single(c => c.Title=="Microeconomics").CourseID,Grade=Grade.B
},newEnrollment{StudentID= students.Single(s => s.LastName=="Barzdukas").StudentID,CourseID= courses.Single(c => c.Title=="Chemistry").CourseID,Grade=Grade.B
},newEnrollment{StudentID= students.Single(s => s.LastName=="Li").StudentID,CourseID= courses.Single(c => c.Title=="Composition").CourseID,Grade=Grade.B
},newEnrollment{StudentID= students.Single(s => s.LastName=="Justice").StudentID,CourseID= courses.Single(c => c.Title=="Literature").CourseID,Grade=Grade.B
}};foreach(Enrollment e in enrollments){var enrollmentInDataBase = context.Enrollments.Where(
s =>
s.Student.StudentID== e.StudentID&&
s.Course.CourseID== e.CourseID).SingleOrDefault();if(enrollmentInDataBase ==null){
context.Enrollments.Add(e);}}
context.SaveChanges();}voidAddOrUpdateInstructor(SchoolContext context,string courseTitle,string instructorName){var crs = context.Courses.SingleOrDefault(c => c.Title== courseTitle);var inst = crs.Instructors.SingleOrDefault(i => i.LastName== instructorName);if(inst ==null)
crs.Instructors.Add(context.Instructors.Single(i => i.LastName== instructorName));}}}

正如您看到的第一个教程,此代码的大部分只是更新或创建新的实体对象和样本数据加载到所需测试的属性。然而,请注意该Course实体,已与Instructor实体的多对多关系,如何处理:

 var courses = new List<Course>
{
new Course {CourseID = 1050, Title = "Chemistry", Credits = 3,
Department = departments.Single( s => s.Name == "Engineering"),
Instructors = new List<Instructor>()
},
...
};
courses.ForEach(s => context.Courses.AddOrUpdate(p => p.CourseID, s));
context.SaveChanges();

Course对象创建时,您将Instructors导航属性初始化为空的集合,使用代码Instructors = new List<Instructor>()。这样一来,我们就可以添加通过使用Instructors.Add方法与本Course相关的Instructor实体。如果您没有创建一个空的列表,您将无法添加这些关系,因为Instructors属性将为 null,并且不会具有一个Add方法。您还可以添加列表初始化到构造函数。

添加迁移和更新数据库

从美国 pmc 公司,输入 add-migration命令:

PM> add-Migration Chap4

如果您尝试更新数据库在这一点上,您将收到以下错误:

ALTER TABLE 语句冲突具有外键约束"FK_dbo。Course_dbo。Department_DepartmentID"。冲突发生在数据库"ContosoUniversity"表"dbo。部",列 'DepartmentID'。

编辑 <时间戳 > _Chap4.cs文件,并使下面的代码更改 (你会添加一条 SQL 语句和AddColumn 语句进行修改):

   CreateTable(
"dbo.CourseInstructor",
c => new
{
CourseID = c.Int(nullable: false),
InstructorID = c.Int(nullable: false),
})
.PrimaryKey(t => new { t.CourseID, t.InstructorID })
.ForeignKey("dbo.Course", t => t.CourseID, cascadeDelete: true)
.ForeignKey("dbo.Instructor", t => t.InstructorID, cascadeDelete: true)
.Index(t => t.CourseID)
.Index(t => t.InstructorID); // Create a department for course to point to.
Sql("INSERT INTO dbo.Department (Name, Budget, StartDate) VALUES ('Temp', 0.00, GETDATE())");
// default value for FK points to department created above.
AddColumn("dbo.Course", "DepartmentID", c => c.Int(nullable: false, defaultValue: 1));
//AddColumn("dbo.Course", "DepartmentID", c => c.Int(nullable: false)); AlterColumn("dbo.Course", "Title", c => c.String(maxLength: 50));
AddForeignKey("dbo.Course", "DepartmentID", "dbo.Department", "DepartmentID", cascadeDelete: true);
CreateIndex("dbo.Course", "DepartmentID");
} public override void Down()
{

(请确保您注释掉或删除现有的AddColumn行,当你添加最新的一个,或当您输入update-database命令时,您将收到错误)。

有时,当您执行迁移的现有数据,您需要将存根 (stub) 数据插入到数据库,以满足外键约束,和这就是你现在在做什么。生成的代码将一个非可以为 null 的DepartmentID外键添加到Course表。如果已有行Course表中的代码运行时,AddColumn操作将失败,因为 SQL Server 不知道要放在不能为空的列的值。因此你已经修改了代码,给新列的默认值,并创建了一个名为"Temp"作为默认部门的存根 (stub) 部门。其结果是,如果存在现有Course行运行此代码时,他们将所有相关的"Temp"部。

Seed方法运行时,它将在 Department表中插入行,它将与那些新的Department行相关Course的现有行。如果您没有添加任何课程在 UI 中,你会然后不再需要"Temp"部门或上Course.DepartmentID列的默认值。若要允许有人可能使用的应用程序添加课程的可能性,你也想更新的Seed方法代码,以确保Course的所有行 (而不仅仅是由早期运行的Seed方法插入) 都具有有效的DepartmentID值之前你从列中删除默认值,并删除"Temp"部。

编辑完后 <时间戳 > _Chap4.cs文件,请在执行迁移的 PMC 输入 update-database命令。

 <add name="SchoolContext" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=CU_Test;
Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\CU_Test.mdf"
providerName="System.Data.SqlClient" />

.

服务器资源管理器打开的数据库,像你那样的早些时候,并展开节点以查看所有的表已创建。(如果你仍有服务器资源管理器从更早的时间打开,单击刷新按钮。

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

您没有创建模型类的CourseInstructor表。如前所述,这是为InstructorCourse的实体之间的多对多关系的联接表。

用鼠标右键单击CourseInstructor表并选择显示表数据来验证它有数据在其中由于Instructor实体添加到Course.Instructors导航属性。

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型

摘要

您现在有一个更复杂的数据模型和相应的数据库。在下面的教程中,您将学习更多关于不同的方式来访问相关的数据。

a{right:0;position:absolute;top:5px}.common-list-horz li.icon-announce{width:65px;min-height:65px;background:url(../images/ui/home-announcements-icon.png?cdn_id=i72) 0 0 no-repeat #969696}.common-list-horz li.icon-spotlight-lrg{display:block;text-decoration:none;width:45px;height:40px;background:url(../images/ui/dialog.png?cdn_id=i72) 0 0 no-repeat transparent;position:relative;margin-left:7px;margin-right:30px;margin-top:-10px}.common-list-horz li.icon-whatsnew-lrg{display:block;text-decoration:none;width:40px;height:40px;background:url(../images/ui/icon_new.png?cdn_id=i72) 0 0 no-repeat transparent;position:relative;margin-left:7px;margin-right:30px;margin-top:-10px}.common-list-horz li.icon-announcements-lrg{display:block;text-decoration:none;width:40px;height:40px;background:url(../images/ui/icon_announcement.png?cdn_id=i72) 0 0 no-repeat transparent;position:relative;margin-left:7px;margin-right:30px;margin-top:-10px}.common-list-horz .common-section-head{margin:0;padding:0;border:0}.get-started .hero{margin-bottom:45px;padding:35px 0 0 40px;width:1140px;height:215px;background-color:#efefef}.get-started .hero h1{margin-bottom:12px;font-size:32px;color:#000}.get-started .hero>p{margin-bottom:30px}.get-started .col-left{width:820px;padding:0 30px 0 0;border-right:1px solid #d2d2d2}.get-started .col-right{width:300px;padding:0 0 0 29px}.get-started .landing-nav{width:100%;border-top:1px solid #d2d2d2;margin-bottom:30px;padding:11px 0 0 0}.get-started .landing-nav:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.get-started .landing-nav h2{margin-bottom:14px;font-size:1.308em;font-weight:bold}.get-started .landing-nav h3{font-weight:bold;line-height:1;margin-bottom:7px}.get-started .landing-nav .excerpt{margin:0;color:#000;min-height:125px}.get-started .landing-nav a.tech-model{display:block}.get-started .landing-nav a.tech-model:hover{background-color:#f0f0f0;text-decoration:none}.get-started .landing-nav a.tech-model h3{color:#267cb2}.get-started .landing-nav a.tech-model:hover h3{text-decoration:underline}.get-started .landing-nav .module-one-col{width:202px;float:left;margin-right:30px}.get-started .landing-nav .module-two-col{width:368px;float:left}.get-started .module-two-col .module-left{margin-right:10px}.get-started .module-two-col .module-left,.get-started .module-two-col .module-right{width:178px;float:left}.get-started .btn-install .label{padding-left:5px}.get-started .content-mod{border-bottom:1px solid #d2d2d2;padding-bottom:30px;margin:0 0 30px 0;overflow:hidden}.get-started .content-mod div{margin-right:39px;width:23%}.get-started .content-mod div.content-txt{min-width:67%}.get-started .content-mod div.float-left{float:left}.get-started .content-mod div.float-right{float:right}.get-started .content-mod a.thumb-vid{border:1px solid #d2d2d2;display:block;width:189px;height:107px;background:url(../images/ui/get-started-thumb-fpo.png?cdn_id=i72) 0 0 no-repeat transparent}.get-started .content-mod a.thumb-vid.websites{background-image:url(../images/ui/getstarted-thumb-websites.png?cdn_id=i72)}.get-started .content-mod a.thumb-vid.api{background-image:url(../images/ui/getstarted-thumb-api.png?cdn_id=i72)}.get-started .content-mod a.thumb-vid.realtime{background-image:url(../images/ui/getstarted-thumb-realtime.png?cdn_id=i72)}.get-started .content-mod a.thumb-vid.mobile{background-image:url(../images/ui/getstarted-thumb-mobile.png?cdn_id=i72)}.get-started .content-mod a.thumb-vid.tools{background-image:url(../images/ui/getstarted-thumb-tools.png?cdn_id=i72)}.get-started .content-mod a.thumb-vid.webforms{background-image:url(../images/ui/getstarted-thumb-web-forms.png?cdn_id=i72)}.get-started .content-mod a.thumb-vid.mvc{background-image:url(../images/ui/getstarted-thumb-mvc.png?cdn_id=i72)}.get-started .content-mod a.thumb-vid.webpages{background-image:url(../images/ui/getstarted-thumb-wmx.png?cdn_id=i72)}.get-started .content-mod a.thumb-vid span{display:block;width:189px;height:107px;background:url(../images/ui/get-started-play-icon.png?cdn_id=i72) center center no-repeat transparent}.get-started .content-mod h2,.customer-mod h2,.case-studies-mod h2{font-size:18px;font-weight:600;color:#000}.module-intro h3{font-size:1.308em;font-weight:bold;margin-bottom:14px}.module-intro .post-thumb{margin:0 16px 5px 0}.get-started .col-left .play-button{background-position:-219px 148px}.get-started .col-left .play-button:hover{background-position:-820px 148px}.get-started .col-right .play-button{background-position:-442px 36px}.get-started .col-right .play-button:hover{background-position:-1043px 36px}.module-jumpstart .post-thumb{float:none}.module-jumpstart img{width:100%}.module-jumpstart .post-duration{font-size:1em;margin-top:5px}.module-jumpstart{color:#363636;margin-bottom:50px}.module-jumpstart h2{font-size:1em;text-transform:uppercase;color:#363636;margin-bottom:8px;font-weight:bold}.customer-mod .border-bottom,.module-jumpstart .border-bottom{border-bottom:1px solid #d2d2d2;padding:0 0 14px 0;margin:0 0 30px 0}.module-jumpstart .border-bottom{margin-bottom:15px}.customer-mod-list{width:810px;height:320px;list-style:none;margin:0 0 30px 0;border-bottom:1px solid #d2d2d2}.customer-mod-list li{float:left;width:202px;height:90px}.customer-mod-list a{margin:10% auto;display:block;text-indent:-999em;background:url(../images/content/ASP-NET-Customers.png?cdn_id=i72) no-repeat 0 -999em}.customer-mod-list .logo-woot{width:118px;height:41px;top:25%;background-position:0 -12px}.customer-mod-list .logo-cheezburger{width:81px;height:57px;left:269px;background-position:-269px -10px}.customer-mod-list .logo-3m{width:86px;height:49px;left:516px;top:8px;background-position:-516px -8px}.customer-mod-list .logo-getty-images{width:112px;height:28px;left:1px;top:109px;background-position:-1px -109px}.customer-mod-list .logo-thinkstock{width:129px;height:27px;left:242px;top:109px;background-position:-242px -109px}.customer-mod-list .logo-*{width:127px;height:38px;left:475px;top:97px;background-position:-475px -97px}.customer-mod-list .logo-british-museum{width:94px;height:52px;left:0;top:172px;background-position:0 -172px}.customer-mod-list .logo-kbb{width:128px;height:49px;left:247px;top:181px;background-position:-244px -181px}.customer-mod-list .logo-usair{width:143px;height:17px;left:462px;top:197px;background-position:-462px -197px}.customer-mod-list .logo-bing{width:82px;height:38px;left:4px;top:281px;background-position:-2px -281px}.customer-mod-list .logo-xbox{width:89px;height:55px;left:270px;top:267px;background-position:-270px -267px}.customer-mod-list .logo-msnbc{width:112px;height:28px;left:493px;top:276px;background-position:-493px -276px}.post-thumb{display:block;float:left;position:relative}.samples h1{color:#000;background:#fff;padding-bottom:10px;margin:0 0 5px 0}.samples .col-left{width:820px;padding:0 30px 0 0;border-right:1px solid #d2d2d2}.samples .col-right{width:300px;padding:0 0 0 29px}.samples .content-wrap{padding:20px 25px 0 0}.samples .content-wrap .common-post{min-height:1%;border-bottom:1px solid #d2d2d2;padding:0 0 22px 0}.samples .content-wrap .common-post h3,.samples .content-wrap .common-post p{margin:0 5px 5px 90px}.samples .content-wrap a img{margin:15px 0 0 20px}.chapter-content .common-post{min-height:1%;padding:0 0 25px 0;margin:0}.learn .hero{margin:-40px 0 40px 0;padding:35px 0 0 40px;width:1140px;height:215px;background-color:#0054a3}.learn .hero-small.webmatrix{background:url(../images/ui/webmatrix-icon-small.png?cdn_id=i72) 10px 7px no-repeat #004082}.learn .hero-small-2{color:#fff}.learn .hero-small-2 a{color:#6cb200}.learn .hero .hero-leftcontent h1{margin-bottom:12px;font-size:32px;color:#fff}.learn .hero .hero-leftcontent p{margin-bottom:30px;color:#fff}.module-chapters{width:239px;float:left;border-right:1px solid #d2d2d2}.module-chapters.extended{width:315px;float:left}.module-chapters .ad a{color:#2186c6}.content-box{padding:5px 15px 5px 15px;border-left:1px solid #d2d2d2;border-right:1px solid #d2d2d2;border-bottom:1px solid #d2d2d2;background:#3a597c}.chapter-box h2{color:#fff;font-size:1.077em}.chapter-box ol,.content-box ul{margin:0;list-style:none}.content-box li{margin:0}.content-box a{display:block;margin:0 -15px;padding:5px 20px}.content-box a:hover{background:#2b496c;text-decoration:none}.content-box a.selected{background:#2b496c}.chap-num{display:block;float:left}.chap-title{display:block;margin-left:15px}.chap-title.greater-than-ten{margin-left:22px}.sponsor-box{display:block;width:185px;padding:20px;background-color:#d2d2d2;font-size:12px;color:#505050;cursor:pointer}.chapter-title{color:#363636;font-size:1.385em;font-weight:500;margin-bottom:16px;line-height:1.3em}.chapter-heading{font-weight:normal;color:#737d86;font-size:1.077em;font-weight:300;margin-bottom:10px}.chapter-content{margin:30px 0 0 30px}.toc-menu{margin-bottom:40px}.toc-menu ul{list-style:none;margin:0;overflow:hidden}.toc-menu ul ul{display:none}.toc-menu ul ul.active{display:block;margin:0}.toc-menu ul li{position:relative}.toc-menu ul li a{color:#000;display:block;font-size:14px;line-height:21px;padding:2px 0 7px 30px;text-decoration:none}.toc-menu ul li a.hasNew{padding-right:34px}.toc-menu ul.articles li a{padding-left:40px;padding-right:20px}.toc-menu ul.articles li a.hasNew{padding-right:34px}.toc-menu ul.subsections li a{padding-left:50px}.toc-menu ul.lists li a{padding:0 20px 0 60px;line-height:20px;margin-bottom:10px}.toc-menu ul li a.arrow{padding-right:0;width:30px;height:17px;position:absolute;top:0;left:-30px}.toc-menu ul li a.arrow span,.toc-menu ul li a.arrow.expanded span,.toc-menu ul li a.arrow.expanded.hover span,.toc-menu ul li a.arrow.hover span{display:block;margin:8px 0 0 10px;width:7px;height:7px;background:url(../images/ui/learn-toc-sprite.png?cdn_id=i72) 0 -7px no-repeat transparent}.toc-menu ul li a.arrow.expanded span{background-position:0 0}.toc-menu ul li a.arrow.expanded.hover span{background-position:0 -16px}.toc-menu ul li a.arrow.hover span{background-position:0 -23px}.toc-menu ul li a.hover{background-color:#0054a3;color:#fff}.toc-menu ul.lists li a.arrow span{background:none}.learn .col-main{width:820px;overflow:hidden;padding-right:30px;border-right:1px solid #d2d2d2}.learn .col-center{width:576px;border-left:1px solid #d2d2d2;margin-left:-1px}.learn .col-right{width:300px;padding:0 0 0 28px;border-left:1px solid #d2d2d2;margin-left:-1px}.important{background:none repeat scroll 0 0 #e7f4ff;border:1px solid #c9ddfa;margin:0 0 20px;padding:12px 15px}.important-heading{background:#ccc;font-size:16px;padding:6px 30px;margin:0 -35px 0 0;font-weight:bold}.important-heading p{margin:0}.important-description{background:url(../images/ui/chapter-icon.png?cdn_id=i72) 30px 25px no-repeat #eee;font-size:14px;color:#000;padding:25px 30px 25px 130px;margin-right:-35px;min-height:55px}.note,.sidebar{background:#ffffec;border:1px solid #e9e8c8;margin:18px 85px 18px 0;padding:12px 15px;position:relative}.note .dogear,.sidebar .dogear{height:14px;width:15px;z-index:1;display:block;position:absolute;top:-1px;right:-2px;background:url(../images/ui/sprite-article.png?cdn_id=i72) no-repeat 0 0}.note p,.sidebar p{margin:10px 0}.note strong,.sidebar strong{color:#000}.important .note .dogear{display:none}.common-list-steps.no-bullets{padding:0}.common-list-steps.no-bullets li{border-top:1px solid #d2d2d2;margin:20px 0 0 30px;padding:20px 0 0 0}.common-list-steps.no-bullets li:first-child{border:0;padding-top:10px}.common-list-steps.no-bullets li li,.common-list-steps.no-bullets li li:first-child{border:0;margin:0;padding:0}.common-list-steps.no-bullets li h3{font-size:16px;font-weight:600;margin-bottom:10px}.common-list-steps.no-bullets li h3 a.hasNew{padding-right:30px}.common-list-steps.no-bullets li p{font-size:14px;color:#000}.common-list-steps.no-bullets li p.details{margin-bottom:3px;font-size:12px;color:#505050}.col-right .keyline{margin:0 0 25px 0}.col-right-learn .social-bar{float:right}.col-right-learn .social-bar img{margin:-5px 0 0 0}.details{margin:0}.summary{margin-bottom:18px}.tbl-action{border:1px solid #e2e4e6;border-collapse:collapse}.tbl-action th{background:#f1f1f1;border-bottom:1px solid #e2e4e6;border-left:1px solid #e2e4e6;padding:10px 17px;font-weight:normal}.tbl-action th:first-child{border-left:1px solid #e2e4e6}.tbl-action td{padding:14px 17px;border-bottom:1px solid #e2e4e6;border-left:1px solid #e2e4e6}.tbl-action td:first-child{background:#f8f8f8;border-left:1px solid #e2e4e6}.module-confirm,.module-error,.module-processing{padding:18px 20px;margin-bottom:12px;text-align:center}.module-confirm p,.module-error p,.module-processing p{margin:0}.module-confirm{color:#000;background:#f3fce3;border:1px solid #cee1af}.module-processing{color:#000;background:#fff6bf;border:1px solid #ffd324}.module-error{color:#eb6666;background:#ffe5e5;border:1px solid #eb6666}.leave-feedback{width:400px;float:right}#comment-submit .common-btn{float:left;margin-top:3px}.leave-comment{border-top:1px solid #e5e5e5;width:100%;padding:30px 0 0 0}.leave-comment:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.leave-comment.module-comment .module-confirm{clear:both;margin-top:15px}.leave-comment.module-comment .module-error{clear:both;margin-top:15px}.leave-comment.module-comment .module-processing{clear:both;margin-top:15px}.leave-comment.module-comment .module-error p{clear:both}.leave-comment.module-comment .col-left{margin-right:0;border-right:0}.leave-comment.module-comment .col-right{width:518px;padding-left:0;margin-bottom:10px}.leave-comment.module-comment .col-comment:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.article-comments.module-comment .col-left{width:170px;padding:0;color:#737d86;margin-right:0;border-right:0}.article-comments.module-comment .col-right{width:500px;padding-left:0;margin-bottom:10px;float:left}.leave-comment .col-left h2{color:#737d86;font-size:1.308em;margin-bottom:5px}.module-comment{clear:both}.module-comment .col-left{width:100%;padding:0;color:#737d86}.module-comment .col-right{width:518px;padding-left:17px}.module-comment label{font-size:.923em}.module-comment-header{padding-bottom:5px;border-bottom:1px solid #d2d2d2}a.show-comments{font-size:.75em;float:right;margin-top:2px}.comments-status{float:left;margin-left:5px;margin-top:2px;clear:none;font-size:.75em;font-weight:bold;color:#507cbd}.article-comments{border-top:1px solid #d2d2d2;padding:22px 0 20px 0;color:#737d86}.article-comments .col-left{color:#737d86;margin:0;margin-top:1px;width:140px}.article-comments .col-left h2{font-size:1.308em}.article-comments .col-right{font-size:1.308em;margin:0}.article-comments .col-right a{vertical-align:middle}.article-comments ul{margin:0;list-style:none;clear:both;padding:0 0 10px 0}.article-comments li{width:100%;border-bottom:1px solid #c1c1c1;padding:10px 0;margin:0;position:relative}.article-comments li:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.article-comments li img{float:left;margin:0 0 0 80px}.article-comments li p{margin:0 0 9px 160px}.comment-details-left{float:left}.comment-details-right a{float:right;cursor:pointer;font-style:italic}#comment-list li img{float:left;margin:5px 0 9px 50px}.author-box.article{border-top:1px solid #e5e5e5;padding:22px 0}.download-box-article{border:1px solid #cee0b1;background:#f3fce4;margin:0 0 15px;padding:12px 15px;display:inline-block;position:relative;color:#242525;text-align:center}.download-box-article p{margin:0;font-size:1em;font-weight:600}.download-box-article .module-common-select{position:absolute;top:45px;left:50%;margin-left:-82px;width:auto;text-align:left}.download-box-article .common-select{width:164px}.article-content img{max-width:675px}.article-content .important ul{margin:0 0 0 15px;padding:0}.article-content .details-box.important ul{margin:0 0 18px 30px}.article-content ul ul{margin:5px 0 0 30px}.article-content li img{display:block;margin:18px 0}.article-content li .note,.article-content li .sidebar{margin-top:35px}.article-content li table{margin-top:10px}.article-content table{border:1px solid #e2e4e6;border-collapse:collapse}.article-content table th{background:#f1f1f1;border-bottom:1px solid #e2e4e6;border-left:1px solid #e2e4e6;padding:10px 17px;font-weight:normal;color:#242525}.article-content table th:first-child{border-left:1px solid #e2e4e6}.article-content table td{padding:14px 17px;border-bottom:1px solid #e2e4e6;border-left:1px solid #e2e4e6}.article-content table td:first-child{background:#f8f8f8;border-left:1px solid #e2e4e6}.article-content h1{margin-bottom:10px;font-size:32px;color:#000}.article-content h3{font-size:1.231em;margin-bottom:10px}.article-content h4{font-size:1.077em;margin-bottom:10px;font-style:italic}.article-content .common-sidebar-module h3{font-size:1em}h4.label{padding-top:10px}.article-content p.intro{font-size:14px;color:#000}.article-page-multi .col-left{width:230px;padding-right:23px}.article-page-multi .col-right{width:697px}.article-page-multi .article-title{width:676px}.article-page-multi .ad-120x90{width:240px;position:absolute;top:-25px;right:-274px}.article-content .common-sidebar-module h4{font-size:13px;font-style:normal}.article-page .col-left{overflow:hidden;padding-right:30px;border-right:1px solid #d2d2d2}.caption{display:block;margin-bottom:30px}.video-thumb-single{display:block;font-size:.846em;position:absolute;cursor:pointer;top:0;right:0}.video-thumb-single:hover{text-decoration:none}.video-thumb-single img{margin:0}.video-thumb-single .play_button{background-position:20px 11px}.video-thumb-single .play_button:hover{background-position:-150px 11px}p.video_thumb{position:relative;overflow:visible;padding:0 90px 0 0}.accordion:hover{cursor:pointer}.accordion span{display:inline-block;width:7px;height:7px;background:url(../images/ui/learn-toc-sprite.png?cdn_id=i72) no-repeat 0 -7px;margin-right:2px;margin-top:0;position:relative;top:-3px}.accordion.open span{background-position:0 0}.mark-fav{color:#fe9b00;background:url(../images/ui/sprite-sharebar-small.png?cdn_id=i72) no-repeat 0 1px;padding:0 0 2px 15px}.mark-complete{color:#3cae03;background:url(../images/ui/sprite-sharebar-small.png?cdn_id=i72) no-repeat 0 -39px;padding:0 0 2px 15px}.module-vid-player{padding:14px 15px;margin:0 0 20px 0;border:1px solid #d2d2d2;background:#eee;width:643px}.module-vid-player img{display:block;margin:0}.module-vid-details{position:relative}.author-box{clear:both;padding:15px 0 0 0}.author-box img{float:left;margin:3px 0 0 50px;width:59px;height:59px}.author-box p{margin:0 0 0 138px}.curricula-list-sidebar h2{font-size:1em;font-weight:bold;text-transform:uppercase;margin:0 0 3px 0;color:#969696}.curricula-list-sidebar p{margin:0}.curricula-list-sidebar p.details{margin:0 0 5px -10px;padding:0 0 10px 10px;font-size:1em;color:#868686;font-style:italic}.curricula-list-sidebar ol{margin:0 0 40px 0;list-style:none;background:#23517c}.curricula-list-sidebar ol a{display:block;padding:15px 20px 15px 43px;color:#fff}.curricula-list-sidebar ol a:hover{text-decoration:none;background-color:#3f688d}.curricula-list-sidebar ol a.selected{background-color:#3f688d}.curricula-list-sidebar li{margin-bottom:0}.curricula-list-sidebar .icon-curricula{background-position:-7985px 17px}.curricula-list-sidebar .icon-video{background-position:-7185px 15px}.curricula-list-sidebar .icon-book{background-position:-1185px 50%}.curricula-list-sidebar .icon-link{background-position:-1785px 50%}.curricula-list-sidebar .icon-whitepaper{background-position:-19585px 50%}.curricula-list-sidebar .icon-wizard{background-position:-4185px 50%}.article-title{margin:0 0 14px 0;width:100%;position:relative;z-index:1}.article-title.keyline{height:auto;background:none;border-bottom:1px solid #d2d2d2;padding-bottom:8px}.article-title:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.article-title h1{margin-bottom:10px;line-height:1.2em}.article-title h1.hasNew{padding-right:56px}.article-title .details{padding:1px 0 0 0;color:#707070}.article-title .details .author-header{width:63%}.social-shares{position:relative}.article-title .social-shares{float:right}.article-title .rate-results{font-size:11px;color:#9a9fa2}.article-title .rate-results a{margin-left:10px;font-size:12px}.content #rate-topic,#rate-confirm{font-family:'Segoe Semibold';background:#fff;position:relative;z-index:2;float:left;font-size:11px;color:#535d65}.content #rate-topic strong{font-weight:normal;float:left;padding:7px 10px 7px 15px;border:1px solid #d2d2d2;border-right-width:0}.content #rate-topic a{background:url(../images/ui/share-sprite.png?cdn_id=i72) 5px 8px no-repeat;float:left;text-decoration:none;color:#2186c6;padding:7px 10px 7px 30px;margin-left:-1px;border:1px solid #d2d2d2;border-width:1px;border-color:#dadada transparent;margin-right:-1px}.content #rate-topic a:hover{background-color:#fafafa;border-color:#dadada}.content #rate-topic a+a{background-position:5px -19px;border-right-color:#dadada}.content #rate-topic a span{color:#7f7f7f;text-decoration:none}.content #rate-topic a.active,.content #rate-topic a.completed{border-color:#dadada;border-bottom-color:#fff;background-position:5px -44px}.content #rate-topic a+a.active,.content #rate-topic a+a.completed{background-position:5px -71px}.content #rate-topic a.completed{border-bottom-color:#dadada}.feedback-form{display:none;font-family:'Segoe Semibold';z-index:1;background:#fff;position:absolute;left:0;top:33px;border:1px solid #d2d2d2;width:643px;padding:15px}.feedback-form textarea{display:block;width:630px;min-height:120px;resize:none;border:1px solid #d2d2d2;padding:5px}.feedback-form input[type=checkbox]{float:left;display:none}.feedback-form input[type=checkbox]+label{cursor:pointer;color:#535d65;padding:5px 10px 5px 20px;float:left;background:url(../images/ui/share-sprite.png?cdn_id=i72) 0 -98px no-repeat;margin:0 10px 10px 0}.feedback-form input[type=checkbox]:checked+label{background-position:0 -122px}.feedback-form input[type="checkbox"]+label.checked{background-position:0 -122px}.feedback-form .area-label{clear:both;color:#535d65;display:block;margin-bottom:10px}.feedback-form .btn-social{cursor:pointer;border:1px solid #d2d2d2;color:#2186c6;padding:8px 14px;border-radius:5px;box-shadow:-1px -1px 0 #fafafa;background-color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f5f5f5));background-image:-webkit-linear-gradient(top,#fff,#f5f5f5);background-image:-moz-linear-gradient(top,#fff,#f5f5f5);background-image:-ms-linear-gradient(top,#fff,#f5f5f5);background-image:-o-linear-gradient(top,#fff,#f5f5f5);background-image:linear-gradient(to bottom,#fff,#f5f5f5)}.feedback-form .btn-social:hover{background-color:#f5f5f5;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#fff));background-image:-webkit-linear-gradient(top,#f5f5f5,#fff);background-image:-moz-linear-gradient(top,#f5f5f5,#fff);background-image:-ms-linear-gradient(top,#f5f5f5,#fff);background-image:-o-linear-gradient(top,#f5f5f5,#fff);background-image:linear-gradient(to bottom,#f5f5f5,#fff)}#rate-confirm{font-style:italic;border:1px solid #d2d2d2;padding:7px;margin:0;text-indent:10px}.feedback-form .btn-social:active{background:#f0f0f0}.feedback-form .btn-social+.btn-social{margin-left:20px}.feedback-form div{margin-top:10px;float:right}.nav-multi-part{border-top:1px solid #d2d2d2;list-style:none;margin:0;width:100%}.nav-multi-part:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.nav-multi-part li{float:left;width:33.33%;margin:0;text-align:center;position:relative}.nav-multi-part li.current{padding:20px 0}.nav-multi-part li.current span{padding-top:6px}.nav-multi-part li.next a,.nav-multi-part li.prev a{padding:20px 0;width:100%;display:block;text-decoration:none}.nav-multi-part li.next a:hover,.nav-multi-part li.prev a:hover{background:#f2f3f4}.nav-multi-part li.next a span,.nav-multi-part li.prev span{color:#000}.nav-multi-part li span{font-size:1.231em;display:block;margin-bottom:7px}.nav-multi-part li.current span.icon{width:12px;height:8px;left:50%;top:0;margin-left:-6px;position:absolute;background:url(../images/ui/sprite-article.png?cdn_id=i72) no-repeat 0 -16px}.nav-multi-part li .arrow{font-size:1.4em;line-height:1;display:inline;margin:0;position:relative;top:1px}.downloads h1{margin-bottom:10px;width:780px}.downloads .col-left{width:820px;padding:0 30px 0 0;margin-top:15px;border-right:1px solid #d2d2d2;min-height:650px}.downloads .col-right{width:300px;padding:0 0 0 29px}.downloads .landing-featured{width:100%;border-top:1px solid #d2d2d2;border-bottom:1px solid #d2d2d2;margin-bottom:18px;padding-top:15px}.downloads .landing-featured:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.landing-featured .col-left{float:left;width:305px;border:0;padding:0;margin:0;min-height:0}.landing-featured .col-right{float:right;width:280px;border:0;padding:0;margin:0}.landing-featured h2{font-size:1.385em;color:#676767;margin-bottom:8px}.landing-featured .play-button{background-position:-381px 70px}.landing-featured .play-button:hover{background-position:-982px 70px}.common-checklist{list-style:none;margin:0 0 20px 0}.common-checklist li{padding-left:23px;background:url(../images/ui/sprite-icons.png?cdn_id=i72) no-repeat -6000px 2px}.smallprint{color:#a9a9a9;font-size:.846em}.hosted h1{border-bottom:1px solid #d2d2d2;padding-bottom:10px;margin-bottom:10px}.hosted.two-col .col-left{padding:0;width:676px;border-right:0}.hosted .col-left .subhero img{margin:0 0 0 0}.hosted .col-left .subhero{border-top:1px solid #c8c8c8;border-bottom:1px solid #4d4e51;padding:45px 0 0 50px;width:626px;height:216px;background-color:#0378d6}.hosted .col-left .subhero h2{margin:0 0 15px 0;font-family:'Segoe UI',Tahoma,Arial,Helvetica,sans-serif;color:#fff;font-size:24px;line-height:24px}.hosted .col-left .subhero h3{margin:10px 0 15px 0;font-family:'Segoe UI Light','Segoe UI',Tahoma,Arial,Helvetica,sans-serif;color:#fff;font-size:40px;font-weight:100;line-height:40px}.hosted .col-left .subhero p{margin:0 0 0 0;font-family:'Segoe UI Light','Segoe UI',Tahoma,Arial,Helvetica,sans-serif;color:#fff;font-size:20px;font-weight:100;line-height:20px}.hosted.two-col .col-right{width:326px}.hosted .col-right .subhero{border-top:1px solid #c8c8c8;border-bottom:1px solid #4d4e51;background-color:#5c2c91;width:297px;height:221px;padding:40px 28px 0 28px}.hosted .col-right .subhero h3{margin:0 0 20px 0;color:#fff;font-family:'Segoe UI Light','Segoe UI',Tahoma,Arial,Helvetica,sans-serif;font-size:30px;line-height:30px;font-weight:100}.hosted .col-right .subhero p{margin:0 0 0 0;color:#fff;font-family:'Segoe UI Light','Segoe UI',Tahoma,Arial,Helvetica,sans-serif;font-size:16px;line-height:22px;font-weight:100}.hosted .subhero a.btn-azure{margin:25px 0 0 0;clear:both;font-family:'Segoe UI Light','Segoe UI',Tahoma,Arial,Helvetica,sans-serif;line-height:35px;font-size:20px;display:inline-block;text-decoration:none;font-weight:100;position:relative;color:#fff;background:url(../images/ui/azure_CTA-white.png?cdn_id=i72) no-repeat 96% center #a5ce00;padding:7px 55px 7px 10px}.hosted .subhero a.btn-azure:hover{background-color:#89c402;transition:all .1s ease-in-out 0s}.hosted .heading{margin-top:25px}.hero{margin-bottom:45px;padding:35px 0 0 40px;width:1140px;height:215px;background-color:#efefef}.hero-leftcontent{float:left;height:100%;width:800px;margin-right:50px;position:relative}.hero-rightcontent{float:right;height:100%;width:850px}.hero-leftimage{float:left;height:100%;width:290px}.hero-rightimage{float:right;height:100%;width:290px}.hero-rightimage img,.two-col .hero-leftimage img{margin:auto;display:block}.hero-rightimage.video a{position:relative;width:246px;height:200px;display:block}.hero-rightimage.video .play-button{background-position:-400px 78px}.hero-rightimage.video .play-button:hover{background-position:-1000px 78px}.hero-small{position:absolute;bottom:25px;width:500px;height:38px;background:url(../images/ui/aspnet-icon-small.png?cdn_id=i72) 10px 10px no-repeat #68217a;margin:0 0 10px 0}.hero-small h2,.two-col .hero-small p{color:#fff;padding-left:52px;font-size:14px}.hero-small h2{float:left;padding-top:12px;font-weight:700;width:370;color:#fff;padding-left:40px;font-size:14px;margin-bottom:3px}.hero-small a{float:right;font-size:12px;padding:4px 15px;margin:6px 10px 0 0}.hero-small-2{position:absolute;top:152px;left:512px;font-size:12px}.hero-small-2 a{font-weight:bold}.hero h1{margin-bottom:12px;font-size:32px;color:#000}.hero>p{margin-bottom:30px}.two-col .col-left{width:785px;padding:0 30px 0 35px;border-right:1px solid #d2d2d2}.two-col .col-right{width:300px;padding:0 0 0 29px}.two-col h3{margin:30px 0 15px 0;font-size:20px}.two-col ul{margin:0 0 30px 18px}.two-col ul li{font-size:14px;margin:15px 0 15px 0}.two-col div.divider{height:1px;background-color:#d2d2d2;width:820px;position:relative;left:-35px;clear:both}.two-col div.spacer{height:1px;background-color:transparent;width:820px;clear:both}.pluralsight .hero{background-color:#0054a3}.pluralsight .hero-small{width:813px;height:58px;background:url(../images/ui/pluralsight-hardcoredevtraining.png?cdn_id=i72) 4px 3px no-repeat #fff;margin:0 0 10px 0}.pluralsight .hero p{margin-bottom:30px;color:#fff}.pluralsight .hero-small h2,.pluralsight .hero-small p{color:#f26521;padding-left:226px;font-size:14px}.pluralsight .hero-small h2{float:none;padding-top:11px;margin-bottom:3px;font-weight:bold}.pluralsight .hero-small a{float:right;margin:-62px 12px 0 0;font-size:12px;padding-bottom:6px;padding-top:6px}.pluralsight .hero .hero-small p{color:#f26521}.pluralsight .hero h1{margin-bottom:12px;font-size:32px;color:#fff}.pluralsight .hero .hero-rightimage img{margin-top:-6px}.pluralsight .col-left{width:785px;padding:0 30px 0 35px;border-right:1px solid #d2d2d2}.pluralsight .col-right{width:300px;padding:0 0 0 29px}.pluralsight h3{margin:30px 0 0 0;font-size:18px}.pluralsight ul.two-column-list{margin:5px 0 30px 0;list-style-type:none;clear:both;overflow:visible;width:800px}.pluralsight ul.two-column-list li{font-size:14px;margin:5px 0 5px 0;float:left;display:block;width:338px;margin-right:46px}.pluralsight div.divider{height:1px;background-color:#d2d2d2;width:1145px;position:relative;left:-35px;margin:45px 0}.pluralsight div.spacer{height:1px;background-color:transparent;width:820px}.pluralsight.content .col-full{padding-left:35px}.pluralsight.content .quotecallout{font-style:italic;font-size:15px}.pluralsight.content .quoteattribution{font-weight:bold}.pluralsight.content .calltoaction{position:relative;height:120px}.pluralsight.content .calltoaction img{margin-right:20px}.pluralsight.content .calltoaction p{font-size:22px;font-weight:100;font-family:'Segoe UI Light','Segoe UI',Tahoma,Arial,Helvetica,sans-serif;margin:0 0 10px 0}.pluralsight.content .calltoaction strong{font-size:16px;font-weight:400;margin:0 0 10px 0;display:block}.pluralsight.content .calltoaction a.btn-install{position:absolute;bottom:0;left:140px;margin:0 0 0 0}.pluralsight.content .calltoaction a.btn-install.second{position:absolute;bottom:0;left:300px;margin:0 0 0 0}.search h1{background:none repeat scroll 0 0 #fff;color:#000;display:inline-block;padding-right:10px;margin-bottom:13px;font-size:30px}.search h2{background:none repeat scroll 0 0 #fff;color:#000;display:inline-block;padding-left:30px;font-size:40px}.search .col-left{width:300px;padding:0 30px 0 0}.search .col-right{width:820px;padding:0 0 0 30px}.search-results{margin:0 30px 0 0;list-style:none;padding:0 0 0 25px}.search-results li{margin-bottom:18px;position:relative}.search-results .resultnumber{position:absolute;left:-40px;font-size:16px;color:#505050;top:0}.search-results h3{font-size:1.154em;margin-bottom:5px;font-weight:bold}.search-results h3 span{font-size:13px;font-weight:normal}.search-results p{margin-bottom:0}.search-filter{background:#f0f0f0;border:1px solid #d2d2d2}.search-facet{padding:10px;width:290px}.search-facet:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.search-facet.scroll-pane{height:155px;overflow:auto;padding:0 10px;margin:10px 0}.search-filter h2{background:#333;color:#fff;margin:0;font-size:1.154em;padding:10px 75px 10px 10px;position:relative}.search-filter h3{background:#dfdfdf url(../images/ui/sprite-search.png?cdn_id=i72) no-repeat 17px -35px;border-top:1px solid #d2d2d2;border-bottom:1px solid #d2d2d2;box-shadow:inset 0 -1px #d9d9d9;-webkit-box-shadow:inset 0 -1px #d9d9d9;-moz-box-shadow:inset 0 -1px #d9d9d9;color:#000;font-weight:normal;padding:6px 10px 6px 35px;cursor:pointer;margin:0}.search-filter h3.last{border-bottom:0}.search-filter h3.show{background:#dfdfdf url(../images/ui/sprite-search.png?cdn_id=i72) no-repeat 17px -76px}.search-filter p{margin:0;width:100%}.search-filter p:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.search-filter .common-checkbox{float:left;margin-right:8px;margin-top:0}.search-filter .common-label{display:block;line-height:1;margin:0 0 6px 4px;padding:0;font-weight:normal}.search-filter .count{color:#9d9d9d;font-size:.769em}.search-filter img{margin:0}.search-filter .search-box{position:relative}.search-filter .search-box:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.search-filter .search-box label{color:#4597cb;margin:3px 5px 0 0;display:block;float:left}.search-box p.search-fields{background:#fff;height:23px;border:1px solid #d2d2d2;display:block;width:207px;float:left}.search-box .input-search-text{border:0;padding:4px 4px 0 4px;display:block;float:left;width:170px;color:#707070}.search-box .input-search-submit{width:28px;height:23px;display:block;float:right;background:url(../images/ui/sprite-search.png?cdn_id=i72) no-repeat 0 0;border:0;cursor:pointer}.search .searchdivider{border-bottom:#969696 solid 1px;width:825px;position:relative}.search .searchdivider img{position:absolute;right:20px;top:-45px}.search .sortingoptions{text-align:right;margin:15px 0 15px 0;width:825px;font-size:14px}.search .sortingoptions span{color:#272727}.btn-clear{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;border:1px solid #d2d2d2;color:#fff!important;display:inline-block;float:right;font-size:.846em;padding:4px 0;position:relative;right:-6px;text-align:center;text-decoration:none;top:-2px;width:54px;background:#bababa url(../images/ui/sprite-btn-clear.png?cdn_id=i72) repeat-x 0 0;cursor:pointer;line-height:1}.btn-clear:hover{text-decoration:none;background-color:#aeaeae;background-position:0 -30px}.btn-clear:active{background-position:0 -60px;background-color:#ccc}h2 .btn-clear{font-size:.733em;border:1px solid #d2d2d2;background-position:0 -90px;background-color:#4e4e4e;position:absolute;top:6px;right:4px}h2 .btn-clear:hover{background-position:0 -120px;background-color:#484848}h2 .btn-clear:active{background-position:0 -150px;background-color:#777}.search-facet-author .search-box p.search-fields{width:193px}.search-facet-author .search-box .input-search-text{width:156px}.search-facet-author .search-dropdown{width:193px;top:32px;left:104px;z-index:2}.search-box .search-dropdown a{padding:4px 9px}.search-facet-date .search-facet label{color:#4597cb;font-size:.923em;display:block}.search-facet-date .search-facet input{line-height:1;border:1px solid #d2d2d2;padding:4px 6px;width:120px;color:#707070}.search-facet-date .search-facet p{width:140px;float:left}.common-label{font-weight:bold;padding-bottom:3px}.pagination{width:551px;border:1px solid #d2d2d2;margin-bottom:25px;background-color:#fff;margin-left:28px}.pagination:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.pagination a,.pagination span.nolink,.pagination .disabled{display:block;width:38px;height:27px;padding-top:12px;float:left;text-align:center;line-height:1}.pagination a{color:#267cb2}.pagination .prev{width:75px!important;margin-right:9px;border-right:1px solid #d2d2d2;text-transform:uppercase;color:#000}.pagination .next{width:75px!important;margin-left:10px;border-left:1px solid #d2d2d2;text-transform:uppercase;color:#000;float:right}.pagination a span{color:#69c2ec}.pagination a:hover{background:#dcdcdc;text-decoration:none}.pagination a.selected{background:#dcdcdc;color:#000}.pagination .disabled{color:#bfbfbf}.recognition h1{background:none repeat scroll 0 0 #fff;display:inline-block;margin-bottom:30px;padding-right:10px}.recognition .tbl-action .col1{width:13%}.recognition .tbl-action .col2{width:16%}.recognition .tbl-action .col3{width:61%}.recognition .tbl-action .col4{text-align:center}.recognition .tbl-action td{vertical-align:middle}.icon-level-member{height:12px;width:60px;background:url(../images/ui/sprite-level-ratings.png?cdn_id=i72) no-repeat 0 1px}.icon-level-participant{height:12px;width:60px;background:url(../images/ui/sprite-level-ratings.png?cdn_id=i72) no-repeat 0 -14px}.icon-level-contributor{height:12px;width:60px;background:url(../images/ui/sprite-level-ratings.png?cdn_id=i72) no-repeat 0 -29px}.icon-level-star{height:12px;width:60px;background:url(../images/ui/sprite-level-ratings.png?cdn_id=i72) no-repeat 0 -44px}.icon-level-all-star{height:12px;width:60px;background:url(../images/ui/sprite-level-ratings.png?cdn_id=i72) no-repeat 0 -59px}.icon-level-member span,.icon-level-participant span,.icon-level-contributor span,.icon-level-star span,.icon-level-all-star span{position:absolute;left:-999em}.module-whos-online h2 a{font-size:.923em;text-transform:lowercase}.tbl-whos-online td{vertical-align:middle}.tbl-whos-online .avatar{display:block;float:left;margin:3px 10px 8px 0}.recog-level-key{width:100%;margin-bottom:18px}.recog-level-key:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.recog-level-key p{font-size:.923em}.recognition h3{text-transform:uppercase;margin-bottom:5px}.tbl-recognition{float:left;width:360px;margin-right:24px}.tbl-recognition th{padding:5px 9px;font-weight:normal;text-transform:uppercase;background:#f3f3f3;border-top:1px solid #a4a4a4;border-bottom:1px solid #a4a4a4;font-weight:bold}.tbl-recognition td{border-bottom:1px solid #a4a4a4;border-left:1px solid #e3e3e3;font-size:.923em;padding:5px 9px}.tbl-recognition td:first-child{border-left:0;background:none}.dl-common dt{margin-bottom:18px}.dl-common dd{margin-bottom:18px}.module-top-movers{margin-bottom:5px}.hof .module-top-movers h3{font-size:1em;text-transform:none;margin-bottom:5px}.tbl-top-movers .col1{width:16%}.tbl-top-movers .col2{width:63%}.tbl-top-movers .col3{width:21%}.module-common-select{padding-bottom:20px;width:100%;position:relative}.module-common-select:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.common-tbl{border-collapse:collapse;width:100%}.common-tbl thead th{background:#f3f3f3;font-weight:bold;white-space:nowrap}.common-tbl th{font-weight:normal;padding:5px 9px;border-top:1px solid #a4a4a4;border-bottom:1px solid #a4a4a4;text-transform:uppercase}.common-tbl td{border-bottom:1px solid #c1c1c1;padding:10px 12px;line-height:1;vertical-align:middle;font-size:.923em;color:#000}.common-tbl .last td{border-bottom:0}.common-tbl h2,.common-tbl h3{font-size:1.083em;margin:0 0 5px 0;font-weight:normal}.common-tbl p{margin:0;color:#82878d}.common-tbl p a{color:#587935}.hof .col-left{width:820px;padding-right:30px;border-right:1px solid #d2d2d2}.hof .col-right{width:300px}.hof h1{color:#000;font-size:32px;margin-bottom:10px}.hof h3{font-size:1.538em;margin-bottom:15px}.hof .tbl-action{border:0}.hof .tbl-action th{background:#f3f3f3;border-top:1px solid #a4a4a4;border-bottom:1px solid #a4a4a4;border-left:0;text-transform:uppercase;padding:5px 9px;font-weight:bold}.hof .tbl-action td{border-bottom:1px solid #a4a4a4;border-left:1px solid #e3e3e3;font-size:.923em;padding:5px 9px}.hof .tbl-action td:first-child{border-left:0;background:none}.tbl-top-movers{border:0}.tbl-top-movers th{background:#f3f3f3;border-top:1px solid #a4a4a4;border-bottom:1px solid #a4a4a4;border-left:0;text-transform:uppercase;padding:5px 9px;font-weight:bold}.tbl-top-movers td{border-bottom:1px solid #a4a4a4;border-left:1px solid #e3e3e3;font-size:.923em;padding:5px 9px}.tbl-top-movers td:first-child{border-left:0;background:none}.common-tbl-hof td{border-bottom:1px solid #a4a4a4}.common-tbl-hof td:first-child{font-size:1em;font-weight:bold;width:63%}.common-tbl-hof td.col2{width:13%}.hof .busy{background-position:center 50px}.module-pbl .tbl-recognition th{background:none;border-top:none;border-bottom:0;text-transform:none;color:#343434;padding-left:0}.module-pbl .tbl-recognition td{padding-left:0;border:0;line-height:1;padding:4px 0;font-size:1em}.module-pbl h2{margin-bottom:0}.module-pbl .tbl-recognition{width:295px}.sort-box{position:relative}.sort-box h2{font-size:1em;color:#000}.sort-box .module-common-select{position:absolute;right:0;top:-6px;width:auto;z-index:1}.two-col.downloads .hero-leftcontent{width:885px;margin-right:0}.two-col.downloads .hero-rightimage{width:250px}.downloads .doublelists{float:left;width:50%;margin:0 0 20px 0}.two-col.downloads ul{list-style:none;margin:0}.two-col.downloads .divider{margin:10px 0;left:0;width:100%}.two-col.downloads .hero-rightimage img{margin-top:-17px}.module-download{width:100%}.module-download:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.module-download h2{font-size:1em;text-transform:uppercase;font-weight:bold;margin-bottom:6px}.module-download ul{margin:0 0 17px 0;list-style:none}.module-download li{margin-bottom:0}.module-download .common-module{width:275px;float:left;margin-right:25px}.module-download .common-module.last{margin:0}.social-avatar{width:59px}.icon-rss{display:block;padding:0 0 0 20px;background:url(../images/ui/sprite-icons.png?cdn_id=i72) -14100px 50%}.common-sidebar-module .tags{font-size:1em}.common-sidebar-module .common-list{margin:0 0 0 0;list-style:none;border:0;padding:0 0 0 0}.common-sidebar-module .common-list li{margin:0;padding:2px 0;border-top:1px solid #d2d2d2}.common-sidebar-module .common-list li.first{border-top:0}.common-sidebar-module .common-list .count{font-size:.833em}.common-sidebar-module .common-list .selected a{color:#fff;background:#23517c;display:block;padding:0 8px;margin-left:-8px;text-decoration:none!important}.common-sidebar-module .common-post{margin:0 0 17px 0;min-height:0;padding:0}.common-sidebar-module .common-list.eventslist li{clear:both;border:none;vertical-align:top;margin:0 0 25px 0}.common-sidebar-module .common-list.eventslist li h3{float:left;position:relative;top:2px;font-weight:500}.common-sidebar-module .common-list.eventslist li p{margin:0 0 5px 100px;font-size:11px}.common-sidebar-module .common-list.eventslist li p a{font-size:16px}.common-sidebar-module .common-list.eventslist li p.cta a{}.common-sidebar-module .common-list.topmovers li{clear:both;border:none;vertical-align:top;margin:0 0 25px 0}.common-sidebar-module .common-list.topmovers li img{float:left;position:relative;top:2px;font-weight:500}.common-sidebar-module .common-list.topmovers li p{margin:5px 0 5px 90px;font-size:11px}.common-sidebar-module .common-list.topmovers li p a{font-size:11px;color:#000}.common-sidebar-module .common-list.topmovers li p.cta a{font-size:16px;color:#267cb2}.common-sidebar-module .icon{display:inline-block;width:16px;height:16px;background:url(../images/ui/sprite-ui.png?cdn_id=i72) no-repeat -100px -100px;margin-left:2px;text-indent:-999em}.common-sidebar-module .common-list.topmovers li.viewall p a,.common-sidebar-module .common-list.eventslist li.viewall p a{font-size:11px;color:#000}.community .col-right div.spacer{width:300px}.comment-noEditor{font:1em 'Segoe UI',Tahoma,Arial,Helvetica,sans-serif;width:502px;height:126px;margin:0;padding:7px;border:1px solid #d2d2d2;margin-bottom:20px;resize:none}.community .head-desc{margin-bottom:40px;color:#000;font-size:14px}.community h1{color:#000;font-size:32px;margin-bottom:10px}.community .col-left{border-right:1px solid #d2d2d2}.community .common-post{min-height:1%;border-bottom:1px solid #d2d2d2;padding:15px 0 35px}.community .common-post.blog-post{padding:10px 0 20px}.community .common-post p{margin-left:90px}.community .common-post.last{border-bottom:0}.community .common-post h2{margin:0 0 5px 90px;font-size:16px;font-weight:600}.community .common-post .details{font-size:11px;font-weight:normal;margin-bottom:4px}.community .common-post img.social-avatar{padding:0}.community .seemore{margin:-20px 0 40px 0;font-size:14px}.community .leftside .seemore,.community .rightside .seemore{position:absolute;bottom:0;left:0;font-size:14px;margin:0 0 18px 0}.community .leftside,.community .rightside{float:left;width:370px;margin-right:40px;margin-bottom:20px;position:relative;padding-bottom:30px}.community .leftside .common-post,.community .rightside .common-post{border:none;margin:10px 0;padding:8px 0 8px 0;height:120px}.community .common-post.small{height:auto}.community div.spacer{background-color:transparent;clear:both;height:1px;width:820px;margin:20px 0 40px}.community div.divider{height:1px;background-color:#d2d2d2;width:820px;clear:both;margin:20px 0 40px}.fl-menu{position:absolute;top:230px;left:10px;font-weight:bold}.fl-menu h2{margin-bottom:5px;font-weight:bold}.fl-menu a{color:#267cb2}.fl-menu a.disabled{color:#ccc;cursor:text}.fl-menu a:hover{text-decoration:none}.col-left-thin .fl-menu li{margin-bottom:3px}.community h1{color:#000;font-size:32px;margin-bottom:10px}.community h3{color:#000;font-size:22px;margin-bottom:20px}.community h3 .icon{top:3px;position:relative}.community .col-left{width:820px;border-right:1px solid #d2d2d2}.community .common-post .details{margin-bottom:5px}.module-community .common-post p,.module-community .common-post h3{margin:0 0 0 80px}.col-left-thin p{font-size:.923em;margin:0 0 12px 0}.col-left-thin ul{font-size:.923em;list-style:none;margin:0 0 25px 0}.col-left-thin li{margin:0}.col-left-thin .sharebox{padding:0}.col-left-thin .sharebox a.btn-share{-moz-border-radius:0;background:url("../images/ui/sprite-sharebar.png?cdn_id=i72") no-repeat scroll -3201px 50% transparent;border:0;display:block;line-height:inherit;padding:0 0 0 20px;position:relative}.col-left-thin .sharebox .flyout{left:60px;top:0}.btn-share:visited,.icon-rss:visited{color:#267cb2}.row-community{width:100%;padding-bottom:10px}.row-community:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.module-community{width:390px;min-height:390px;float:left;margin:0 15px 0 0;overflow:hidden}.module-community.even{margin:0}.module-community.autoheight{min-height:0;margin-bottom:0}.community-header{background:#f2f2f2;color:#555e66;font-size:1em;font-weight:bold;line-height:1;padding:6px 14px 6px 8px;border-bottom:1px solid #bfc4c9;margin:0 0 20px 0}.community-header a{font-size:.769em;font-weight:bold;color:#267cb2}.community-header.icon-rss-head a.icon{margin-left:4px;font-size:1em}.article-comments.module-comment .icon-rss-head a.icon{margin-left:4px;font-size:1em;text-align:left;vertical-align:middle}.common-post .details a.author{color:#587935}.module-community .ad-300x250{width:300px;margin:0 auto;padding:15px 0 0 0}.post-icon{width:70px;height:70px;background:url(../images/ui/sprite-icons-lg.png?cdn_id=i72) no-repeat -999em 50%;float:left}.post-icon.icon-compare{background-position:-600px 50%}.post-icon.icon-cal{background-position:0 50%}.post-icon.icon-control-gallery{background-position:-1198px 50%}.module-community .link-more{margin:2px 0 0 0;float:right}.module-community.module-community-participate .common-post{min-height:48px}.module-community.module-community-participate .post-icon{height:48px}.module-community.module-community-participate .details a{color:#000}.module-community.module-community-participate .details a:hover{text-decoration:none}.icon-comments{padding:0 0 0 13px;background:url(../images/ui/sprite-icons.png?cdn_id=i72) no-repeat -4200px 50%}.icon-retweet{padding:0 0 0 17px;background:url(../images/ui/sprite-icons.png?cdn_id=i72) no-repeat -4800px 50%}.icon-rate{padding:0 0 0 15px;background:url(../images/ui/sprite-icons.png?cdn_id=i72) no-repeat -5400px 50%}.common-post span.icon-level-member,.common-post span.icon-level-participant,.common-post span.icon-level-contributor,.common-post span.icon-level-star,.common-post span.icon-level-all-star{display:inline-block;margin-left:5px;position:relative;top:1px}.archives .head-desc{margin-bottom:45px;color:#000;font-size:14px}.archives h1{color:#000;font-size:32px;margin-bottom:10px}.archives .col-left{border-right:1px solid #d2d2d2}.archives .common-post{min-height:1%;border-bottom:1px solid #d2d2d2}.archives .common-post p{margin-left:80px}.archives .common-post.last{border-bottom:0}.archives .common-post h2{margin:0 0 3px 80px;font-size:16px;font-weight:600}.archives .common-post .details{color:#000;font-size:11px;font-weight:normal;margin-bottom:4px}.archives .common-post img.social-avatar{padding:0}.archive-content{width:100%;margin-bottom:15px}.archive-content:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.archive-content ul{margin:0 5px 0 0;width:100px;list-style:none;float:left}.archive-content li{margin:0}.archive-content .count{color:#000;font-size:.833em}.archives .ad-iab-txt{position:static;margin:0;float:right;padding-bottom:10px;width:305px}.archives .pagination{margin:20px 0 10px 80px}.terms h1{border-bottom:1px solid #d2d2d2;padding-bottom:15px;margin-bottom:16px}.terms .common-sidebar-module{font-size:1em;float:right;width:300px}.privacy h1{border-bottom:1px solid #d2d2d2;padding-bottom:15px;margin-bottom:16px}.module-privacy:first-child{border-right:1px solid #d2d2d2;border-left:0}.module-privacy{float:left;font-size:.923em;min-height:168px;padding:20px 17px;width:440px;border-left:1px solid #d9d9d9;margin-left:-1px}.module-privacy h2{font-size:1.5em}.row-privacy.first{border:medium none}.row-privacy{border-top:1px solid #d2d2d2;width:100%}.row-privacy:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.content-404{padding:34px 10px 20px 80px;width:880px;min-height:360px}.content-404 h1{padding:10px 0 16px 0;border-bottom:1px solid #d2d2d2}.icon-exclamation{display:block;width:44px;height:44px;background:url(../images/ui/sprite-error.png?cdn_id=i72) no-repeat 0 0;position:absolute;left:20px;top:40px}.content.contact-us{padding-bottom:94px}.contact-us h1{margin-bottom:40px;font-size:32px;color:#000}.contact-us .keyline-title{top:-20px}.contact-us .details{color:#8b8c8d;font-weight:bold;margin-bottom:20px}.icon-list,.icon2-list{float:left}.icon-list ul,.icon2-list ul{list-style:none;margin:0}.icon-list li,.icon2-list li{margin-bottom:10px}.icon-list li span,.icon2-list li span{display:inline-block;width:55px;height:55px;background:url(../images/ui/contact-icons-sprite.png?cdn_id=i72) 0 0 no-repeat #454545}.icon-list li span.c-a,.icon2-list li span.c-a{background-position:0 0}.icon-list li span.c-b,.icon2-list li span.c-b{background-position:0 -55px}.icon-list li span.c-c,.icon2-list li span.c-c{background-position:0 -110px}.icon-list li span.c-d,.icon2-list li span.c-d{background-position:0 -165px}.icon-list li span.c-e,.icon2-list li span.c-e{background-position:0 -220px}.icon-list li span.c-f,.icon2-list li span.c-f{background-position:0 -275px}.icon-list li a,.icon2-list li p{display:inline-block;height:55px;vertical-align:top;font-size:14px;font-weight:600;margin:0 0 0 15px}.icon2-list li a{display:block;margin-bottom:10px}.icon2-list li p{font-size:12px!important;width:690px}.icon2-list li p a{font-size:14px!important}.contact-us h2{border-bottom:1px solid #d2d2d2;padding-bottom:30px;margin-bottom:35px;font-size:22px;font-weight:600}.icon-list{width:415px}.icon2-list{width:765px}.quick-list a{display:block;font-size:14px;font-weight:600;margin-bottom:10px}@media only screen and (device-width:768px){.promo-box-wrapper li:hover a span{display:none}}.module-form-wrapper{width:780px;padding:20px;margin:50px 0 24px;position:relative;background:#f8f8f8;border:1px solid #e2e4e6}.module-form-wrapper h3{background:#f1f1f1;margin:-20px -20px 20px;padding:10px 10px 8px 8px;border-bottom:1px solid #e2e4e6}.form-wrapper p{margin:0;float:left;width:100%;clear:both;height:auto!important;min-height:36px;padding-bottom:10px}.form-wrapper label{float:left;width:150px;color:#000;display:block;padding-top:5px;font-weight:bold}.form-wrapper input.input_box,.form-wrapper textarea.txt_area{margin:0;float:left;width:230px;padding:5px;background-color:#fff;border:1px solid #dcdedf}.form-wrapper textarea.txt_area{width:360px;height:84px}.form-wrapper p.submit{padding:0;margin:0 0 0 150px}.form-wrapper .error{color:#eb6666}.form-wrapper span.required{color:#eb6666}.form-wrapper input.error{color:#eb6666;border:1px solid #eb6666}.form-wrapper textarea.error{color:#eb6666;border:1px solid #eb6666}.form-wrapper .error-container{display:none;background-color:#ffe5e5;border:1px solid #eb6666;margin-bottom:20px;padding:5px;color:#eb6666}.form-wrapper .error-container ol li{list-style-type:disc;margin-left:20px}.form-wrapper .error-container h4{color:#eb6666;font-weight:bold;margin:10px}.error-container label.error{display:inline;font-weight:normal}.error-container label{width:100%;float:none}.section-head{background:#f3f3f3;border-top:1px solid #d2d2d2;border-bottom:1px solid #d2d2d2}.col-left .section-head{font-size:.923em;text-transform:uppercase;font-weight:bold;padding:9px 30px 9px 12px;position:relative}.section-head.icon-rss-head .icon{position:absolute;top:8px;right:8px}.common-post.border-bottom{border-bottom:1px solid #d2d2d2;padding-bottom:0}.ajax .hero p{width:800px}.ajax .common-post{border-bottom:1px solid #d2d2d2;min-height:50px;padding-bottom:0;margin-bottom:25px}.ajax div.common-post:last-child{border-bottom:none}.ajax .common-post .excerpt{padding-bottom:17px;font-size:14px}.ajax .common-post.last .excerpt{border-bottom:0;padding-bottom:25px}.ajax p,.ajax h3{margin:0 0 0 0}.ajax h3{font-weight:600;font-size:16px;margin:0 0 5px 0}.ajax .icon-rss-head{position:relative;color:#000}.ajax .icon-rss-head .icon{top:10px;margin-left:20px}.ajax .author-attribution{}.ajax .author-attribution img{}.ajax .author-attribution h2{margin:0 0 25px 0}.ajax .author-attribution h3{margin:0 0 0 85px}.ajax .author-attribution p{margin:5px 0 0 85px}.mobile .hero-leftcontent{float:left;height:100%;width:700px}.mobile .hero-rightimage{float:right;height:100%;width:390px}.mobile .common-post{border-bottom:1px solid #d2d2d2;min-height:50px;padding-bottom:0;margin-bottom:25px}.mobile div.common-post:last-child{border-bottom:none}.mobile .common-post .excerpt{padding-bottom:17px;font-size:14px}.mobile .common-post.last .excerpt{border-bottom:0;padding-bottom:25px}.mobile p,.ajax h3{margin:0 0 0 0}.mobile h3{font-weight:600;font-size:16px;margin:0 0 5px 0}.mobile .icon-rss-head{position:relative;color:#000}.mobile .icon-rss-head .icon{top:10px;margin-left:20px}.mobile h2{margin:50px 0 25px 0;color:#000}.mobile h2:first-child{margin:0 0 25px 0;color:#000}.landing-ajax{width:100%;margin:0 0 15px 0;list-style:none}.landing-ajax:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.landing-ajax li{float:left;margin-bottom:0;width:280px}.landing-ajax li h2{font-size:1em;line-height:1.3em;margin-bottom:7px}.landing-ajax li h2 a{display:block;padding:90px 0 0 0}.landing-ajax li.control-kit{margin-right:40px;background:url(../images/ui/sprite-ajax.png?cdn_id=i72) no-repeat 80px 20px}.landing-ajax li.jquery{background:url(../images/ui/sprite-ajax.png?cdn_id=i72) no-repeat -630px 35px}.landing-ajax li.cdn{margin-right:40px;clear:both;background:url(../images/ui/sprite-ajax.png?cdn_id=i72) no-repeat -1288px 18px}.landing-ajax li.juice{background:url(../images/ui/sprite-ajax.png?cdn_id=i72) no-repeat -1761px 18px}.get-started .landing-nav h4{margin-bottom:6px}.get-started .landing-nav ul{margin:0 0 0 15px}.get-started .landing-nav li{margin:0}.get-started .landing-nav .bullets{color:#000;display:none}.tag1{font-size:x-large}.tag2{font-size:larger}.tag3{font-size:medium}.tag4{font-size:small}.vnext{margin-right:15px;padding:20px;color:#222;margin-bottom:40px;border:1px solid #d2d2d2}.vnext img{margin:15px 0 0}.new{position:absolute;width:26px;height:26px;background:url(../images/ui/icon_new_26x26.png?cdn_id=i72) no-repeat 0 0;margin-left:8px}.new2{position:absolute;width:46px;height:46px;background:url(../images/ui/icon_new_46x46.png?cdn_id=i72) no-repeat 0 0;margin-left:8px}.original-date{text-align:right;font-style:italic}.WidgetEnabled{background-color:#555!important}@media only screen and (max-width:480px){h1{font-size:22px!important;line-height:25px!important}.learn-nav{display:none}.hero{width:auto;height:100%;padding:20px;overflow:hidden;margin-bottom:45px}.learn .hero .hero-leftcontent p:last-of-type{margin-bottom:0}.hero-small,.hero-small-2{display:none}.hero-leftcontent{width:100%}.hero-rightimage{display:none}.col-right .common-post img{margin-bottom:5px}.home .header-wrap{border-bottom-width:0;background:none!important}.home .hero{display:block;height:100px;margin:0;padding:0}.home.content{padding:0}.home h1{display:none}.nav-user.logged-in .username{position:absolute;padding-left:20px;white-space:nowrap;top:254px;background:#3e5480;width:290px;z-index:3;line-height:40px;left:40px;font-size:18px;color:#efeff0;box-shadow:-1px 10px 10px rgba(0,0,0,.6);margin-bottom:-5px;-moz-transition:all ease-out .2s;-ms-transition:all ease-out .2s;-o-transition:all ease-out .2s;-webkit-transition:all ease-out .2s;transition:all ease-out .2s}.nav-user.logged-in .username:hover{text-decoration:none}.nav-user.logged-in .username:before{content:"Signed in as ";color:#7f90b1}.nav-user.logged-in .hover .username{left:-296px}.home .leftside,.home .rightside{float:none;width:auto;margin:0 5px}.home .rightside{margin-top:30px}.home .common-list-horz.list-one{margin:15px 0}.home .common-list-horz.list-two{margin:15px 0}.home .common-list-horz.list-two li a{display:block}.home .common-list-horz.list-two li{line-height:normal}.home .common-list-horz.list-one li span,.home .common-list-horz.list-two li span{font-size:16px;margin:15px 15px 0 0}.home .common-list-horz.list-two li .icon{top:0}.home .common-list-horz.list-one li div{display:block;line-height:15px;margin-bottom:10px;margin-top:-10px}.home .common-list-horz.list-one li div a{font-size:14px;line-height:20px}.home .common-list-horz.list-one li div span.pipe{font-size:14px}.home .common-list-horz.list-two{margin-bottom:30px;border-top:none;padding-top:5px}.common-list-horz{width:auto}.common-list-horz.list-one li{line-height:22px}.common-list-horz.list-one li.announcement{padding-left:15px;vertical-align:top}.common-list-horz.list-two li.announcement{padding:0 0 10px 15px}.common-list-horz li.icon-announce,.common-list-horz li.icon-rss-lrg{display:none}.common-list-horz li.icon-whatsnew-lrg{display:none}.common-list-horz li.icon-spotlight-lrg{display:none}.common-list-horz li.icon-announcements-lrg{display:none}.home .common-list-horz.list-two li span{margin:0 36px 0 0}.home .common-list-horz.list-two li.announcement>a{top:5px}.common-post{padding:0 5px;width:auto;border-bottom:1px solid #d2d2d2}.home .common-post .excerpt{border-bottom-width:0}.get-started .hero,.learn .hero{width:auto;height:100%;padding:20px;overflow:hidden;margin-top:0}.get-started .hero>p{width:100%}.get-started .content-mod div{width:100%}.get-started .col-left{float:none;width:100%;border:0;padding:0}.get-started .content-mod div.float-right,.get-started .content-mod div.float-left{float:none;margin-bottom:20px}.get-started .customer-mod-list{width:100%;height:auto}.get-started .customer-mod-list li{width:50%}.get-started .customer-mod:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.get-started .case-studies-mod{margin-top:30px}.learn .col-main{border:0;padding:0}.learn .col-center{border:0}.important-heading{margin:0;padding:10px}.common-list-steps.no-bullets li{margin:0;padding:20px 0 0!important}.community .col-left{width:100%;border:0;padding:0}.community .common-post h2,.community .common-post p,.common-sidebar-module .common-list.topmovers li p{margin-left:80px}.community .leftside,.community .rightside{float:none;width:100%}.community .leftside .common-post,.community .rightside .common-post{height:auto}.common-tabs{position:absolute;z-index:0;background:transparent;top:70px;left:0;margin:0;padding:0 5px;width:100%}.common-tabs li{position:absolute;left:0;width:100%;margin:0;background:transparent;padding:0 5px}.common-tabs li a,.common-tabs li a.selected{box-shadow:none;border:1px solid #000;border-radius:0;text-align:left;line-height:20px;padding:5px 10px}.common-tabs{border-radius:0}.common-tabs .selected{z-index:3}.col-top .ad-300x250{position:relative;margin:0 auto 20px;display:none}.common-checklist li{margin-bottom:15px!important}.col-top{padding:0}.col-main{width:100%!important;padding:0}.col-center{padding:0!important;width:100%!important;border-right-width:0!important;margin:0!important}.module-chapters{width:100%!important}.content.article-page.article-content h1{margin-bottom:0}.article-title.keyline{margin-bottom:0;border-bottom:0;width:100%}.content.article-page.article-content .common-tabs{top:115px}.content.article-page.article-content ol img{width:100%}.important.important-box-article p,.important.important-box-article ul,.important.important-box-article strong,.important.important-box-article code{color:#49545d;font-size:14px}.important.important-box-article ul{margin-left:40px}.content.article-page.article-content .col-left h2{color:#4e4e4e;font-weight:normal;font-size:18px}.content.article-page.article-content ol{margin:0;list-style-position:inside;font-size:14px}.content.article-page.article-content ol li p{color:#4e4e4e}.content.article-page.article-content ol pre{margin:0 0 20px 0!important;white-space:pre-wrap;border-style:solid}.sidebar{width:100%}.content.article-page.article-content ul{list-style-type:none;margin:0}.article-content img{width:auto;height:auto;max-width:100%}.author-box.article{border-top:1px solid #d2d2d2;padding:10px 0;border-bottom:1px solid #d2d2d2}.author-box img{margin:0;width:59px;height:59px}.author-box p{margin-left:80px;color:#4e4e4e;font-size:14px;margin-bottom:0}.article-title.keyline h1+.details{margin-bottom:20px}.article-comments.module-comment{border-top-width:0}.article-comments.module-comment .icon-rss-head{display:none}.module-comment .col-left{width:auto}.leave-comment.module-comment .col-right{margin-top:0!important}.common-sidebar-module{clear:both}#comments-toggle{display:block;clear:both;float:left;width:100%;background:transparent;margin-top:20px}#comments-toggle a{display:block;clear:both;float:left;width:100%;text-transform:uppercase;background:#e8ecee;padding:10px 20px;color:#868e95;font-size:14px;text-decoration:none}.post-thumb.generic,.post-thumb{display:none}.common-post-vid h3,.common-post-vid p{float:left;margin-left:0!important}.common-post-vid p{float:left;margin-left:10px!important}.module-intro .post-thumb{display:block}.module-comment-header{border-bottom-width:0}p.breadcrumbs{font-size:14px;color:#474747}#comment-list li:first-child{border-top:0}#comment-list li a:first-child img{margin:0;width:30px;height:30px}#comment-list li p{margin-left:40px!important;color:#737d86}#comment-list li:last-child{border-bottom-width:0}.module-vid-player{width:100%;height:256px}.module-vid-player img{width:100%;height:100%}.module-vid-player object,.module-vid-player video,.module-vid-player iframe{width:100%!important;height:226px!important}.download-box-article{margin-top:20px;position:relative;border:1px solid #d2d2d2;border-width:1px 0 0;width:100%;background:transparent;text-align:left;padding:0;line-height:54px;margin-bottom:0}.download-box-article .separator{float:left;margin:0;display:none}.download-box-article p:before{content:"Downloads:";font-size:14px;color:#4c5969;text-transform:uppercase;font-weight:normal;color:#4c5969;text-indent:0;position:absolute;top:-40px;left:0;height:100%}.download-box-article p{width:100%;text-indent:-9999px;font-size:0!important}.download-box-article p a{float:left;font-size:14px;font-weight:normal;background:#598527;color:#fff;font-size:16px;width:30%;padding:5px 0;text-align:center;line-height:20px;text-indent:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin:5px 10px 5px 0}.download-box-article+h2{margin-top:20px}.download-box-article{width:100%}.download-box-article:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.prettyprint.linenums span{white-space:normal}.note{width:100%}.nav-multi-part{border-top:0;border-bottom:1px solid #d2d2d2}.leave-comment{border-top:0}.leave-comment p,.leave-comment h2{text-align:left;color:#4e4e4e}.leave-comment .col-left h2{margin-bottom:10px}#comment-body{width:100%}.module-comment input[type=button],.module-comment input[type=submit]{margin:0 10px 0 0!important}.leave-feedback{width:auto;float:left;margin-left:120px;margin-top:-40px}.article-comments{padding-top:0}.module-chapters{display:none}p.video_thumb{padding-right:120px}.video-thumb-single{height:auto;background:none;position:absolute;bottom:0}.video-thumb-single .play_button{border:0;background:#809aaf;color:#fff;text-align:center;width:120px;height:auto;padding:10px;left:-120px}.video-thumb-single img{display:none}.video-thumb-single .play_button:after{content:"Watch Video";text-transform:uppercase;font-size:14px}.converted{display:none}.common-tabs{display:none}.curricula-list-sidebar ol{display:none}.search-facet{width:100%;padding:0}.content.search h1{font-size:18px}.keyline-title{border:0}.search-filter{background:transparent;border:0}.search-filter h2,.search-filter h3,.search-filter .search-box label{display:none}.search-filter .search-box{position:relative}.search-filter .search-box p.search-fields,.search-filter .search-box input[type=text]{background:#f6f6f6;width:100%;padding:0 10px;line-height:20px;border:0}.search-filter .search-box p.search-fields{border:1px solid #d2d2d2;overflow:hidden;margin-bottom:20px}.search-filter .search-box .input-search-submit{position:absolute;right:0;top:0}.search .col-right{width:100%}.pagination{width:100%}#search-order-select{margin-bottom:20px}.search-results{margin:0}.pagination .prev{background:url(../images/ui/pager-arrows.png?cdn_id=i72) 0 0 no-repeat;width:10px!important;height:15px!important;text-indent:-9999px;border:0;margin:6px 5px 0}.pagination .next{background:url(../images/ui/pager-arrows.png?cdn_id=i72) -10px 0 no-repeat;width:10px!important;height:15px!important;text-indent:-9999px;border:0;margin:6px 5px 0}.pagination a{line-height:25px;padding-top:0}.pagination .nolink{line-height:20px;padding-top:0}.pagination a,.pagination span.nolink,.pagination .disabled{width:26px}.nolink+a{display:block!important}.pagination>:last-child{display:block!important}.downloads .doublelists{float:none;width:100%}.pluralsight.content .calltoaction{position:none;height:100%}.pluralsight.content .calltoaction a.btn-install.second{position:relative;left:0}.pluralsight.content .calltoaction a.btn-install{position:relative;left:0;margin-bottom:15px}.pluralsight ul.two-column-list li{float:none}.pluralsight.content .calltoaction p{font-size:16px}.archives .head-desc{width:inherit}.archives .search-results{padding:0}.archives .col-left{padding:0;width:100%;border:0}.archives .pagination{margin:0 0 10px 0}.two-col .col-left{width:100%;padding:0;border:0}.mini-nav{display:block}.ad-300x250{margin:15px auto 35px}.ad-300x250 a{display:block}.ad-300x250 img{display:block;margin:0 auto}.ad-728x90{visibility:hidden;margin:0;height:0;display:none}.ad-728x90.ad{display:none!important}.ad-home{display:none!important}.module-community{width:100%}.fl-menu{display:none}.common-post{padding:0 5px 20px}.promo-box-wrapper li h2 a{min-height:152px}.article-content table td,.article-content table th{padding:0;margin:0;width:0}.downloads h1{width:auto}.hosted .col-left .subhero .subherohero{display:none}.hosted.two-col .col-left,.hosted.two-col .col-right{width:100%;height:100%;padding-right:0}.hosted .col-left .subhero,.hosted .col-right .subhero{width:100%;padding:20px;height:100%}.hosted .col-left .subhero h3,.hosted .col-right .subhero h3{font-size:22px;line-height:22px}.hosted .col-left .subhero p,.hosted .col-right .subhero p{font-size:18px;line-height:20px}.hosted .subhero a.btn-azure.white{line-height:20px}.col-right-learn{width:100%;padding:0;float:none;border:0;margin-left:-1px}.col-right-learn .social-bar{margin:22px 0}.details .social-bar{position:static!important;margin:22px 0!important}article header{height:auto;margin:0;padding:0}.icon-list,.icon2-list{width:100%}.icon-list,.icon2-list{float:none}.icon-list li a,.icon2-list li p{width:75%;height:auto}.icon2-list{margin-top:30px}.module-form-wrapper{width:100%}.form-wrapper textarea.txt_area{width:230px}.content.contact-us{padding-bottom:0}.hof .col-left{width:100%;border:0;padding:0}.tbl-recognition{width:auto}.sort-box .module-common-select{position:static}.mobile .hero-leftcontent{width:100%;margin:0}.search .sortingoptions{width:100%}.search-results .resultnumber{left:-25px}.tags{width:100%}div.hero.fourwide{height:auto}.ajax .icon-rss-head .icon{margin-left:0}.pluralsight.content .col-full{padding:0}.samples .col-left{width:100%;border:0;padding:0;margin:0}.samples .content-wrap{padding:0;margin-top:15px}.two-col h3:first-child{margin-top:0}ul.entity-content li a{margin-right:10px;min-height:70px}.new,.new2{display:none}}.modal{background:none repeat scroll 0 0 #fff;border:1px solid #666;box-shadow:0 0 1em #666;left:50%;position:fixed;top:40%;z-index:1000}.modal a.modal-close{position:absolute;right:15px;top:15px;color:#3babd0;font-size:20px}.modal a.modal-close:hover{text-decoration:none;color:#000}.modal .modal-header{min-height:90px}.modal .modal-contents{padding:15px 15px 0}.modal h2{font-size:1em;font-weight:bold;color:#000;line-height:1.4em}.modal-cover{background:none repeat scroll 0 0 #fff;height:100%;top:0;opacity:.6;position:fixed;width:100%;z-index:20}@media only screen and (max-width:480px){.modal{visibility:hidden}}.modal-webpi{width:700px;margin-left:-350px;margin-top:-108px}.modal-webpi p{height:150px;border:1px solid #e1e2e2;margin:15px 0;padding:15px;font-size:15px;line-height:1.4em}.modal-webpi .btn-install{float:right}.pln{color:#000}@media screen{.str{color:#a31515}.kwd{color:#00f}.com{color:green}.typ{color:#2b91af}.lit{color:red}.pun,.opn,.clo{color:#000}.tag{color:#a31515}.atn{color:red}.atv{color:#00f}.dec{color:purple}.var{color:#000}.fun{color:#000}}@media print,projection{.str{}.kwd{font-weight:bold}.com{font-style:italic}.typ{font-weight:bold}.lit{}.pun,.opn,.clo{}.tag{font-weight:bold}.atn{}.atv{}}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}pre,.code_block{padding:5px;margin:18px 0 30px;border:1px dashed #ccc;font-family:"Consolas",monospace;overflow:auto;display:block;white-space:pre;background-color:#f3f3f3}code{font-family:"Consolas",monospace;color:#800039}pre.lang-command-line{color:#000!important}pre.lang-command-line span{color:#000!important}pre.lang-terminal{background-color:#000;color:#fff!important}pre.lang-terminal span{color:#fff!important}.social-bar{text-align:right;margin:22px 0;height:20px;overflow:hidden}.details .social-bar{margin:0;position:absolute;right:52px;bottom:5px}.social-item{display:inline-block;margin-left:10px;vertical-align:top;height:20px;overflow:hidden;width:98px}.print-bar{position:absolute;right:0;bottom:7px}.print-bar a{background:#969696;color:#fff;padding:0 11px 3px}.print-bar a:hover{background:#d2d2d2;text-decoration:none}.notes{background:#efefef;padding:25px;margin:15px 0}.notes span{background:url(../images/ui/sprite-notes.png?cdn_id=i72) 0 0 no-repeat;display:block;width:28px;height:31px;position:absolute;margin-left:-59px}.notes-important span{background-position:-75px 0}.notes-caution span{background-position:0 0}.notes-warning span{background-position:-37px 0}.notes-tip span{background-position:-107px 0}.notes-basic span{background-position:-170px 0}.notes-security span{background-position:-136px 0}.notes-important{border-left:40px solid #ffb900}.notes-caution{border-left:40px solid #ff8c00}.notes-warning{border-left:40px solid #e81123}.notes-tip{border-left:40px solid #00bcf2}.notes-basic{border-left:40px solid #7fba00}.notes-security{border-left:40px solid gray}.print-only,.print-only-inline{display:none}@media print{.print-no{display:none}.print-only{display:block}.print-only-inline{display:inline}header{display:none}.footer{margin-top:0;width:auto;padding:10px}.footer-menu{margin:0}.footer-menu li{display:none}.footer-menu li.block{display:block}.footer-menu.last{display:none}.allcontent{min-width:inherit}.content{width:auto;padding:0;margin:10px}.learn-nav{display:none}.module-chapters{display:none}.download-box-article{text-align:left}.col-right-learn{width:auto;padding:0;float:none;border:0}.col-right-learn a:link,.col-right-learn a:visited{font-weight:bold}.col-right-learn a:link:after{content:" (" attr(href) ") ";font-size:90%}.article-content img{max-width:100%}.article-title .details .author-header{width:100%}.video-thumb-single{display:none}.print-bar{display:none}.social-bar{display:none}.nav-multi-part{display:none}.leave-comment{display:none}.comments-status{display:none}#comments-toggle{display:none}.note .dogear,.sidebar .dogear{display:none}.ad-728x90{display:none}pre{white-space:pre-wrap}.hero{width:auto}.hero .btn-install{display:none}.two-col a:link,.two-col a:visited{font-weight:bold}.two-col a:link:after{content:" (" attr(href) ") ";font-size:90%}.hero-rightimage{display:none}.hero-leftcontent{width:auto}.two-col .important .btn-install{display:none}.two-col .col-left{width:100%;border:0;padding:0}.two-col .col-right{display:none}.two-col div.divider{width:100%;left:0}}.select-convert,.mini-nav,.new-inbox{display:none}@media only screen and (max-width:480px){*{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.new-inbox{display:none!important}.allcontent{min-width:0;max-width:480px;width:100%}.content{width:100%;padding:0 5px;margin:0;position:relative}.nav-user.logged-in{display:block;background:none;height:50px;width:44px;top:0}.nav-user.logged-in>ul{padding-top:0;margin:0;position:absolute;top:0;left:0;height:50px;width:44px}.nav-user.logged-in img.avatar{display:none}.nav-user.logged-in>ul>li{margin-left:50px;display:block!important;position:absolute;left:0;top:0;height:50px;width:38px}.nav-user.logged-in .username+p{position:absolute;padding-left:20px;top:290px;background:#3e5480;width:290px;z-index:3;line-height:40px;left:40px;font-size:18px;color:#efeff0;box-shadow:-1px 10px 10px rgba(0,0,0,.6);margin-bottom:-5px;-moz-transition:all ease-out .2s;-ms-transition:all ease-out .2s;-o-transition:all ease-out .2s;-webkit-transition:all ease-out .2s;transition:all ease-out .2s}.nav-user.logged-in .hover .username+p{left:-296px}.nav-user.logged-in .common-dropdown.hover li.drop-head{display:none}.new-notifications{background:#f7e3e4!important}.nav-user.logged-in .common-dropdown{clear:both;height:24px;width:24px;z-index:2;display:block;border:none;padding:0}.nav-user.logged-in .common-dropdown li:first-child{margin-top:24px}.nav-user.logged-in .common-dropdown li,.nav-user.logged-in .common-dropdown li.last-child{margin-top:-4px;display:block;margin-left:22px;float:none;margin-left:85px;background:#efeff0;width:290px;border-top:1px solid #fff;box-shadow:-1px 10px 10px rgba(0,0,0,.6);margin-bottom:-5px;z-index:2;-moz-transition:all ease-out .2s;-ms-transition:all ease-out .2s;-o-transition:all ease-out .2s;-webkit-transition:all ease-out .2s;transition:all ease-out .2s}.nav-user.logged-in .common-dropdown.hover li{display:block;margin-left:-248px}.nav-user.logged-in .common-dropdown.hover:before,.nav-user.logged-out.hover:before{content:"";width:620px;height:9000px;position:absolute;top:49px;left:-540px;background:rgba(0,0,0,.6);z-index:-1}.nav-user.logged-in .common-dropdown li>a{color:#267cb2;font-weight:normal;display:block;padding:13px 18px 17px 18px;font-size:14px}.nav-user.logged-in .common-dropdown li>a.selected{color:#267cb2!important;background:none;box-shadow:none}.nav-user.logged-out{position:absolute;top:0;right:0;display:block;clear:both;padding:0;margin:0;height:36px;width:36px;background:transparent url(../images/ui/asp-net-icon-cog-b.png?cdn_id=i72) 0 0 no-repeat;background-size:100% 100%;z-index:2;top:8px;right:8px;border:10px solid transparent;border-radius:8px;padding:9px 10px 9px 11px;display:block;left:auto}.nav-user.logged-out p{position:absolute}.nav-user.logged-out.hover p{position:absolute;display:block;right:0;top:38px;width:200px}.nav-user.logged-out p a{margin-top:-4px;display:block;float:none;margin-left:235px;background:#efeff0;width:290px;border-top:1px solid #fff;box-shadow:-1px 10px 10px rgba(0,0,0,.6);margin-bottom:-5px;z-index:2;font-weight:normal;padding:12px 18px 16px 18px;font-size:14px;color:#267cb2;-moz-transition:all ease-out .2s;-ms-transition:all ease-out .2s;-o-transition:all ease-out .2s;-webkit-transition:all ease-out .2s;transition:all ease-out .2s}.nav-user.logged-out.hover p a{margin-left:85px}.nav-user.logged-out p span{display:none}#messages{display:none!important;position:absolute;top:0;left:0!important;display:block;height:100%;width:40px;line-height:40px}body{max-width:480px;min-width:0}header{min-width:0;height:65px;max-width:480px;padding-top:10px;background:transparent;width:100%;min-height:65px;margin-top:0}header a#logo{position:static;display:block;margin-left:0;width:79px;height:48px;margin-bottom:5px;background-image:url('../images/ui/asp-net-logo-c.png?cdn_id=i72');background-size:100% 100%}div.search-header{margin:0;background:transparent;position:absolute;width:18px;height:18px;top:17px;right:140px;left:auto;border-width:0}div.search-header input{display:none}div.search-header input[type=text],nav,.language-translation a.language,.nav-user.logged-out,.nav-user.logged-in .common-dropdown.hover,.nav-user.logged-in .common-dropdown,.nav-user.logged-out.hover,nav .active{background:transparent url(../images/ui/asp-net-mobile-icon-sprite.png?cdn_id=i72) 0 0 no-repeat;height:48px;width:48px}div.search-header input[type=text]{background-size:95px 47px;display:block;width:24px;height:24px;border:0;position:absolute;top:0;left:0;padding:0;margin:0;text-indent:-9999px;line-height:0}div.search-header input[type=text]:focus{width:150px;text-indent:0;left:auto;color:#343434;background:#fff;padding:7px 10px;font-size:14px;top:-7px;right:0;height:32px;box-shadow:inset 0 0 2px rgba(0,0,0,.7);border-radius:3px;-moz-transition:width ease-out .2s;-ms-transition:width ease-out .2s;-o-transition:width ease-out .2s;-webkit-transition:width ease-out .2s;transition:width ease-out .2s;border:1px solid #ccc}.language-translation{position:absolute;top:0;right:0}.language-translation a.language{background-position:-24px 0;color:#fff;font-size:0;height:24px;width:24px;display:block;padding:0;position:absolute;right:97px;left:auto;top:16px;-webkit-background-size:95px 47px;-moz-background-size:95px 47px;-o-background-size:95px 47px;background-size:95px 47px}.language-translation a.language.active{background-position:-24px -24px}.language-translation .translator{width:245px;z-index:1}.common-dropdown{position:absolute;right:60px;top:50px}.language-translation .common-dropdown{position:absolute;left:-245px;top:65px;padding-bottom:10px}.language-translation a.active:before{content:"";width:1020px;height:9000px;position:absolute;top:49px;left:-470px;background:rgba(0,0,0,.6);z-index:-1}nav{background-size:95px 47px;clear:both;padding:0;margin:0;height:24px;width:24px;background-position:-48px 0;position:absolute;z-index:1;top:16px;right:60px}nav.active{background-position:-48px -24px}.nav-user.logged-in .common-dropdown.hover+.new-inbox{display:none}.nav-user.logged-in .common-dropdown.hover li.second-child{margin-top:49px}.nav-user.logged-in .common-dropdown.hover{background-size:95px 47px;background-position:-72px -24px}.nav-user.logged-out.hover{width:24px;background-size:95px 47px;background-position:-72px -24px}.nav-user.logged-in .common-dropdown{height:24px;background-size:95px 47px;background-position:-72px 0}.new-inbox{display:block;position:absolute;background-color:#fc5558;height:50px;margin-left:-50px;width:44px;top:0;left:0;text-align:center;line-height:50px;font-size:18px;color:#fff;z-index:3}.nav-user.logged-in .common-dropdown.notifications .mini-nav:first-child a{color:#f46e70;text-decoration:none}.nav-user.logged-out{background-size:95px 47px;background-position:-72px 0;border:0;height:24px;width:24px;border-radius:0;padding:0;right:18px;top:16px}nav.nav-main>ul li,nav.nav-main>ul li.last-child{margin-top:0}nav.nav-main>ul li,nav.nav-main ul li.last-child,.nav-main-solutions p a{display:block;margin-left:22px;float:none;margin-left:85px;background:#efeff0;width:200px;border-top:1px solid #fff;box-shadow:-1px 10px 10px rgba(0,0,0,.6);margin-bottom:-5px;z-index:2;-moz-transition:all ease-out .2s;-ms-transition:all ease-out .2s;-o-transition:all ease-out .2s;-webkit-transition:all ease-out .2s;transition:all ease-out .2s}nav.nav-main>ul>li:first-child{margin-top:48px;margin-left:85px}nav.nav-main>ul.hover>li{display:block;margin-left:-110px}nav.nav-main>ul>li{display:none}nav.nav-main ul.hover:before{content:"";width:520px;height:9000px;position:absolute;top:49px;left:-400px;background:rgba(0,0,0,.6);z-index:-1}nav.nav-main ul li>a,.nav-main-solutions .col ul li a,.nav-main-solutions p a{color:#267cb2;font-weight:normal;display:block;padding:13px 18px 17px 18px;font-size:14px}nav.nav-main ul li>a.selected{color:#267cb2!important;background-color:#ccc;box-shadow:none}nav.nav-main ul li>a:hover{text-decoration:underline}.nav-user.logged-in>ul>li{width:60px}.nav-main-solutions .col ul{float:none;margin-left:0;display:block;width:100%;padding-bottom:0}.nav-main-solutions{position:static!important;z-index:auto}.dropdown-learn a,.dropdown-community a{position:relative;display:block!important;padding:13px 18px 17px!important}.dropdown-learn,.dropdown-community{display:none!important;z-index:3;position:absolute;top:36px;left:-130px;padding:0;-moz-transition:all ease-out .2s;-ms-transition:all ease-out .2s;-o-transition:all ease-out .2s;-webkit-transition:all ease-out .2s;transition:all ease-out .2s}.dropdown-learn:hover,.dropdown-community:hover{display:none!important}nav.nav-main ul.solutions-expanded.communitypulldown .dropdown-community{display:block!important}nav.nav-main ul.solutions-expanded.learnpulldown .dropdown-learn{display:block!important}nav.nav-main ul.solutions-expanded .dropdown-learn:before,nav.nav-main ul.solutions-expanded .dropdown-community:before{content:"";width:1020px;position:absolute;top:8px;left:-470px;background:rgba(0,0,0,.6);z-index:-1}nav.nav-main ul.solutions-expanded li{margin-left:-230px}nav li a.selected .icon-dropdown,nav li:hover a.selected .icon-dropdown{background-position:-10px 0}.nav-main-solutions .col{display:block;float:none;position:static;margin:0;width:100%;padding:0}.nav-main-solutions .col h2,.nav-main-solutions p span{display:block;border-bottom:0;margin:0;background:#d3d3d4;font-size:14px;color:#80808a;width:100%;padding:10px 0 10px 20px;margin-top:-5px;box-shadow:-1px 10px 10px rgba(0,0,0,.6)}*{-webkit-text-size-adjust:100%}.nav-main-solutions .col h2{margin:0}nav.nav-main ul.solutions-expanded .nav-main-solutions .col ul li{margin-left:0;width:100%}nav.nav-main ul.solutions-expanded .nav-main-solutions .col ul li hr{display:none}.nav-main-solutions p{margin:0;padding:0;font-size:0}.nav-main-solutions p a{margin:0;width:100%;margin-top:-20px}.nav-main-solutions p span+a{margin-top:0}.nav-main-solutions>a{position:relative}nav ul .icon-dropdown,nav ul a:hover .icon-dropdown{right:30px;top:12px;width:10px;height:15px;background:url(../images/ui/pager-arrows.png?cdn_id=i72) -10px 0 no-repeat;padding:0;margin:0}.nav-user{display:none;right:0}.header{min-height:50px}.select-convert{display:block;width:100%;margin-bottom:20px}.col-center{width:100%!important;max-width:480px;padding:0!important;margin-left:0;margin-right:0;border:0}.col-right{width:100%!important;padding:0!important;margin:30px 0 0 0!important}.footer{width:100%;padding:0 0 11px 0}.footer-menu h2,.footer-menu li h2 a{font-size:13px;color:#989797;margin-bottom:10px;line-height:1.4em}.footer-menu li{line-height:1em}.footer-menu li a{font-size:10px}ul.footer-menu{margin-bottom:10px;width:100%}ul.footer-menu+ul.footer-menu{width:auto;margin:10px 0 0;float:left;padding-right:0;max-width:100%}ul.footer-menu+ul.footer-menu li:first-child~li{float:left}ul.footer-menu.last li:first-child~li{margin:-3px 0 0 0}ul.footer-menu{padding:0 5px}ul.footer-menu.last{float:left;position:relative;max-width:205px;margin:0;padding-left:5px}.footer-menu .separator{padding:0 2px}.footer .logo-microsoft{width:88px}div.social{display:none}}
-->

EntityFramework_MVC4中EF5 新手入门教程之四 ---4.在EF中创建更复杂的数据模型的更多相关文章

  1. EntityFramework&lowbar;MVC4中EF5 新手入门教程之六 ---6&period;通过 Entity Framework 更新关联数据

    在前面的教程中,您将显示相关的数据 :在本教程中,您会更新相关的数据.对于大多数的关系,这个目标是可以通过更新相应的外键字段来达到的.对于多对多关系,实体框架并不直接,暴露联接表,因此您必须显式添加和 ...

  2. EntityFramework&lowbar;MVC4中EF5 新手入门教程之三 ---3&period;排序、 筛选和分页

    在前面的教程你实施了一套基本的 CRUD 操作,为Student实体的 web 页.在本教程中,您将添加排序. 筛选和分页到 StudentsIndex的功能.您还将创建一个页面,并简单分组. 下面的 ...

  3. EntityFramework&lowbar;MVC4中EF5 新手入门教程之二 ---2&period;执行基本的 CRUD 功能

    在前面的教程中,您创建 MVC 应用程序中,存储和显示数据使用实体框架和 SQL 服务器 LocalDB.在本教程中,您会审查和自定义的 CRUD (创建. 读取. 更新. 删除) MVC 脚手架会自 ...

  4. EntityFramework&lowbar;MVC4中EF5 新手入门教程之一 ---1&period;创建实体框架数据模型

    Contoso University  Web 应用程序 你会在这些教程中构建的应用程序是一个简单的大学网站. 用户可以查看和更新学生. 课程和教师信息.这里有几个屏幕,您将创建. 这个网站的用户界面 ...

  5. EntityFramework&lowbar;MVC4中EF5 新手入门教程之七 ---7&period;通过 Entity Framework 处理并发

    在以前的两个教程你对关联数据进行了操作.本教程展示如何处理并发性.您将创建工作与各Department实体的 web 页和页,编辑和删除Department实体将处理并发错误.下面的插图显示索引和删除 ...

  6. EntityFramework&lowbar;MVC4中EF5 新手入门教程之五 ---5&period;通过 Entity Framework 读取相关数据

    在前面的教程中,您完成School数据模型.在本教程中,您会读取和显示相关的数据 — — 那就是,实体框架将加载到导航属性的数据. 下面的插图显示页面,您将完成的工作. 延迟. 预先,和显式加载的相关 ...

  7. ASP&period;NET MVC4 新手入门教程之八 ---8&period;向模式中添加验证

    在这本部分会将验证逻辑添加到Movie模式,和你会确保验证规则执行任何时候用户试图创建或编辑使用该应用程序的一部电影. 保持事物的干练性 ASP.NET MVC 的核心设计信条之一是 DRY(”Don ...

  8. ASP&period;NET MVC4 新手入门教程之四 ---4&period;添加一个模型

    在本节中,您将添加一些类,用于管理数据库中的电影.这些类将 ASP.NET MVC 应用程序的"模型"部分. 您将使用一种称为实体框架的.NET 框架数据接入技术来定义和使用这些模 ...

  9. 安卓自动化测试(2)Robotium环境搭建与新手入门教程

    Robotium环境搭建与新手入门教程 准备工具:Robotium资料下载 知识准备: java基础知识,如基本的数据结构.语法结构.类.继承等 对Android系统较为熟悉,了解四大组件,会编写简单 ...

随机推荐

  1. Memcached原理深度分析详解

    Memcached是 danga.com(运营LiveJournal的技术团队)开发的一套分布式内存对象缓存系统,用于在动态系统中减少数据库负载,提升性能.关于这个东 西,相信很多人都用过,本文意在通 ...

  2. js判断是移动端还是pc端

    运行页面的时候,执行到js会判断来自于移动端还是pc端,如果是移动端则跳转制定链接地址,这样在手机端会有额外的不必要浪费的加载时间 var browser={ versions:function(){ ...

  3. SVN的搭建和使用总结

    Subversion是优秀的版本控制工具,其具体的的优点和详细介绍就不多做介绍,主要说一下SVN的服务端搭建.客户端安装.使用及出现的问题的解决办法. 首先来下载和搭建SVN服务器. 现在Subver ...

  4. 容联手机接口封装到ThinkPHP3&period;2&period;菜鸟图文教学

    今天来说下短信发送技术. 使用的是 容联http://www.yuntongxun.com/ 用法很简单, 具体要知道的参数有 ACCOUNT SID   应用ID AUTH TOKEN 应用toke ...

  5. 座IO理解力

    一般堵塞IO服务器通信,通常有一个单独的Acceptor线程负责监控client联系,它接收client对于每个请求连接后client分配用于处理一个新的线程,处理后.返回应答给client.线程才销 ...

  6. MySQL中整型数据的差别

    bigint 从 -2^63 (-9223372036854775808) 到 2^63-1 (9223372036854775807) 的整型数据(所有数字).存储大小为 8 个字节. P.S. b ...

  7. 【深入理解JVM】类加载器与双亲委派模型

    原文链接:http://blog.csdn.net/u011080472/article/details/51332866,http://www.cnblogs.com/lanxuezaipiao/p ...

  8. java多线程编程之连续打印abc的几种解法

    一道编程题如下: 实例化三个线程,一个线程打印a,一个线程打印b,一个线程打印c,三个线程同时执行,要求打印出10个连着的abc. 题目分析: 通过题意我们可以得出,本题需要我们使用三个线程,三个线程 ...

  9. js call使用

    call 方法 请参阅 应用于:Function 对象 要求 版本 5.5 调用一个对象的一个方法,以另一个对象替换当前对象. call([thisObj[,arg1[, arg2[, [,.argN ...

  10. BOM简介

    BOM简介 BOM Browser Object Model 浏览器对象模型 // 通过window对象来访问浏览器 console.log(window.document); // frames:当 ...