public object Post(CreateJournal message) { var sw = Stopwatch.StartNew(); using (var db = _connectionFactory.Open()) { var journal = new Journal { Name = message.Name, Description = message.Description, CreatedAt = DateTime.Now }; db.Insert(journal); } sw.Stop(); return new JournalResponse {TimeTakenMs = sw.ElapsedMilliseconds}; }
public object Post(CreateJournal message) { var sw = Stopwatch.StartNew(); using (var db = _connectionFactory.Open()) { var journal = new Journal { Name = message.Name, Description = message.Description, CreatedAt = DateTime.Now }; db.Insert(journal); } sw.Stop(); return(new JournalResponse { TimeTakenMs = sw.ElapsedMilliseconds }); }