コード例 #1
0
 public Conversation Change(Conversation conversation)
 {
     _worker.Perform((session) => 
         session.SaveOrUpdate(conversation)
     );
     return conversation;
 }
コード例 #2
0
 public Conversation Insert(Conversation conversation)
 {
     _worker.Perform((session) => 
         session.SaveOrUpdate(conversation)
     );
     return conversation.Id != Guid.Empty
         ? conversation
         : new UnknownConversation();
 }
コード例 #3
0
 public Conversation Change(Conversation conversation)
 {
     try
     {
         context.Commit();
         return conversation;
     }
     catch(Exception exception)
     {
         return new UnknownConversation();
     }
 }
コード例 #4
0
 public Conversation Insert(Conversation conversation)
 {
     try
     {
         var entity = context.Conversations.Add(conversation);
         context.Commit();
         return entity;
     }
     catch(Exception exception)
     {
         return new UnknownConversation();
     }
 }