public override TModel Insert(ISession currentSession, TModel model) { global::NHibernate.ISession nativeSession = GetNativeSession(currentSession); nativeSession.SaveOrUpdate(model); nativeSession.Flush(); return(model); }
public override IEnumerable <TModel> Insert(ISession currentSession, IEnumerable <TModel> models) { global::NHibernate.ISession nativeSession = GetNativeSession(currentSession); foreach (TModel model in models) { nativeSession.SaveOrUpdate(model); } nativeSession.Flush(); return(models); }