Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void InsertIntoDatabase (ICollection<PricelistEntry> entries) {
- using (var session = _sessionFactory.OpenSession ())
- using (var transaction = session.BeginTransaction ()) {
- foreach (var entry in entries) {
- session.SaveOrUpdate (entry);
- }
- transaction.Commit ();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement