// Foreign keys public virtual LayoutTypes LayoutTypes { get; set; } // FK_Layouts_LayoutTypesand also
// Foreign keys
HasRequired(a => a.LayoutTypes).WithMany(b => b.Layouts).HasForeignKey(c => c.LTypeId); // FK_Layouts_LayoutTypes
where the configuration class is based oninternal partial class LayoutsConfiguration : EntityTypeConfiguration<Layouts>Both of these classes are auto-generated.
var query = SearchHelper.GetFilteredSearch<LayoutsList>(_dbSetList.Include("LayoutTypes").AsQueryable(), searchRequest); var pagedResultMessage = SearchHelper.GetPagedResult(query, searchRequest); return pagedResultMessage;The original code was based on the Layouts table and model and class and so it worked OK. With that new view LayoutsList I am wondering how can I introduce the LayoutTypes into the picture. I can create a partial class for LayoutsList to have this line of code
<pre> // Foreign keys public virtual LayoutTypes LayoutTypes { get; set; } // FK_Layouts_LayoutTypes