public void Process(AutomaticReplyDefined @event) { _automaticReplies.SaveAutomaticReply( @event.Id, @event.Type, @event.Language, @event.Message, @event.ProjectId); }
public async Task Process(AutomaticReplyDefined @event) { var automaticReply = await _automaticReplies.GetByProjectTypeAndLanguageAsync(@event.ProjectId, (AutomaticReplyType)@event.Type, @event.Language) ?? new AutomaticReply(@event.Id); automaticReply.ProjectId = @event.ProjectId; automaticReply.Type = (AutomaticReplyType)@event.Type; automaticReply.Message = @event.Message; automaticReply.Language = @event.Language; await _automaticReplies.Save(automaticReply); }
public void Process(AutomaticReplyDefined @event) { var reply = _automaticReplies.GetById(@event.Id); reply.Language = @event.Language; reply.Message = @event.Message; reply.ProjectId = @event.ProjectId; reply.Type = (AutomaticReplyType)@event.Type; _automaticReplies.Update(reply); }