public Pick PickCard(Draft draft, Member member, Card card) { var pick = new Pick() { Draft = draft, Member = member, Card = card, CreatedDate = DateTime.Now}; using (ISession session = NHibernateHelper.OpenSession()) using (ITransaction transaction = session.BeginTransaction()) { session.Save(pick); transaction.Commit(); } return pick; }
public void RemovePick(Pick pick) { using (ISession session = NHibernateHelper.OpenSession()) using (ITransaction transaction = session.BeginTransaction()) { session.Delete(pick); transaction.Commit(); } }