public object Put(UpdateMessage request) { var message = new ServiceModel.Message.Message(request.Id, request.Name); return(_repository.Update(request.Id, message) ? message : null); }
public object Post(CreateMessage request) { var message = new ServiceModel.Message.Message(0, request.Name); return(_repository.Insert(message.Id, message) ? message : null); }