public override void Update(DbItem item) { if (!IsAuthenticated) { throw AuthException.NotLoggedIn(); } _dataService.Update(item); }
private TcpMessage HandleUpdateItem(TcpConnectedHost host, TcpMessage message) { if (!message.HasType(TcpRequestType.UpdateItem)) { return(null); } if (!IsAuthenticated(host)) { throw AuthException.NotLoggedIn(); } var request = new ObjectTcpMessage <DbItem>(message); var item = request.Item; if (item != null) { _dataService.Update(item); } return(new TcpMessage(TcpRequestType.Ok)); }