fluentapi

Building a Code-First Model Using FluentAPI in Entity Framework

Now that we've created a Code-First model using Attributes, let's walk through the other manner by which we can create a model: FluentAPI. The Model Once again, we will be using the same CourseCatalog model: To start off, let's create the classes necessary to represent these entities: public class Student { public int ID { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public DateTime DateOfBirth { get; set; } public virtual StudentAddress Address { get; set; } public virtual ICollection<... Read more >
/* * * DON'T EDIT BELOW THIS LINE * * */ (function () { var s = document.createElement('script'); s.async = true; s.type = 'text/javascript'; s.src = '//' + disqus_shortname + '.disqus.com/count.js'; (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); }());