问题描述
嗨朋友们,我正在尝试使用代码第一个逆向工程概念来构建应用程序。为此我创建了一个名为codefirst的mvc5应用程序。在那个应用程序中,我添加了三层广告Bms.core,
Bms.Data
和Bms.Services
我添加了一个名为Customer with get的类文件,在Bms.core下设置属性。
我添加了一个名为ICustomer的接口一个方法名称,如IList< customer> ShowLIst()。
之后我不知道我在哪里实现列出数据的代码......
在Bms.Data中,我使用代码第一个逆向工程概念从db添加数据...
Hi friends, I am trying to build an application by using code first reverse engineering concept.. For that i created one mvc5 application named as codefirst. In that application i added three layers such ad Bms.core,
Bms.Data
and Bms.Services
I added one class file called Customer with get,set properties under Bms.core.
I added one Interface called ICustomer with one method name like IList<customer> ShowLIst().
After that I dont know Where i implement the code for listing the data...
In Bms.Data, I added the data from db using code first reverse engineering concepts...
推荐答案
public class RepositoryMap: EntityTypeConfiguration<RepositoryClass>
{
public RepositoryMap()
{
this.ToTable("TableNameInDB");
this.HasKey(u => u.Id);
this.Property(u => u.Name);
}
}
这篇关于代码首先在mvc5中进行逆向工程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!