Hi i need help with something because the migrations and generally the logic is driving me crazy .. I made an extendable Web application using the answer in this link "MEF with MVC 4 or 5 - Pluggable Architecture (2014)" . And of course as every Web Application must create models in order to work . When i try to run the update-database in the migrations instead of ignoring every model idint create in the module it just tries to recreate and of course it throws errors . How ican make it so if it finds a table that exists and isnt changed to ignore it so to show no error messages , just to go to next models.
The mdoels are :
> [Table("ProjectRleases")]
public class FileReleases
{
[Required]
public int Id { get; set; }
public string Tittle { get; set; }
[Required]
public string Version { get; set; }
public DateTime Published { get; set; }
[DataType(DataType.Html)]
public string content { get; set; }
[DataType(DataType.Upload)]
public virtual List<ProjectFiles> Files { get; set; }
[Required]
public virtual Project Project { get; set; }
[Required]
public virtual ApplicationUser UploadedBy { get; set; }
//
[Required]
public virtual ChangeLog ChangeLog { get; set; }
}
[Table(" Projects")]
public class Project
{
[Required]
public int Id { get; set; }
// public int revision { get; set; }
[Required]
[DataType(DataType.Text)]
public string Name { get; set; }
[DataType(DataType.MultilineText)]
public string Description { get; set; }
[Required]
public virtual ApplicationUser Admininstrator { get; set; }
public virtual List<ApplicationUser> Members { get; set; }
public virtual List<ProjectNews> News { get; set; }
public virtual List<FileReleases> Releases { get; set; }
public virtual List<ChangeLog> ChangeLogs { get; set; }
}
[Table("ProjectNews")]
public class ProjectNews:News
{
[Required]
public virtual Project Project{ get; set; }
[Required]
public int ProjectId { get; set; }
}