EF添加
程序员文章站
2022-05-28 23:08:29
public static int AddBook(BookInfo bookInfo) { using (BookDBContext dbContext = new BookDBContext()) { dbContext.BookInfo.Add(bookInfo); return (dbCon ......
public static int addbook(bookinfo bookinfo)
{
using (bookdbcontext dbcontext = new bookdbcontext())
{
dbcontext.bookinfo.add(bookinfo);
return (dbcontext.savechanges());
}
}
上一篇: EF修改部分字段