Пример #1
0
        public void InsertStudent(int id, string name)
        {
            _context.StudentInfos.Add(new StudentInfo
            {
                Id   = id,
                Name = name
            });

            _context.SaveChanges();
        }
Пример #2
0
        public void AddBook(int bookId, string title, string author, string version, string barcode, int count)
        {
            _context.BookInfos.Add(new BookInfo
            {
                BookInfoId = bookId,
                Title      = title,
                Author     = author,
                Version    = version,
                Barcode    = barcode,
                Count      = count
            });

            _context.SaveChanges();
        }
Пример #3
0
 public void Save()
 {
     _context.SaveChanges();
 }