public object Get(GetJournal message)
        {
            using (var db = _connectionFactory.Open())
            {
                var journal = db.SelectByIds<Journal>(new long[] {message.Id}).FirstOrDefault();
                if (journal == null)
                    return new HttpResult() {StatusCode = HttpStatusCode.NotFound};

                return journal;
            }
        }
Beispiel #2
0
        public object Get(GetJournal message)
        {
            using (var db = _connectionFactory.Open())
            {
                var journal = db.SelectByIds <Journal>(new long[] { message.Id }).FirstOrDefault();
                if (journal == null)
                {
                    return new HttpResult()
                           {
                               StatusCode = HttpStatusCode.NotFound
                           }
                }
                ;

                return(journal);
            }
        }