Model+DAL+BLL
namespace Model
{
public class exam
{
[Key]
public int id { get; set; }
public string Name { get; set; }
public string number { get; set; }
public string department { get; set; }
public string state { get; set; }
public string begintime { get; set; }
public string endtime { get; set; }
public string remark { get; set; }
}
}
namespace Model
{
public class Page
{
public int pages { get; set; }
public int pagecount { get; set; }
public object data { get; set; }
}
}
namespace DAL
{
public class dalexan
{
fdbcontext db = new fdbcontext();
public int add(exam model)
{
db.exam.Add(model);
return db.SaveChanges();
}
public List select( )
{
return db.exam.ToList();
}
}
}
namespace BLL
{
public class bllexam
{
dalexan dal = new dalexan();
public int add(exam model)
{
return dal.add(model);
}
public List select()
{
return dal.select();
}
}
}