public Conversation Change(Conversation conversation) { _worker.Perform((session) => session.SaveOrUpdate(conversation) ); return conversation; }
public Conversation Insert(Conversation conversation) { _worker.Perform((session) => session.SaveOrUpdate(conversation) ); return conversation.Id != Guid.Empty ? conversation : new UnknownConversation(); }
public Conversation Change(Conversation conversation) { try { context.Commit(); return conversation; } catch(Exception exception) { return new UnknownConversation(); } }
public Conversation Insert(Conversation conversation) { try { var entity = context.Conversations.Add(conversation); context.Commit(); return entity; } catch(Exception exception) { return new UnknownConversation(); } }