コード例 #1
0
        public IHttpActionResult GetBoon(int id)
        {
            var boon = db.Boons
                       .Include(b => b.Level)
                       .Include(b => b.Creditor)
                       .Include(b => b.Debtor)
                       .Include(b => b.Registrar)
                       .SingleOrDefault(b => b.Id == id);

            if (boon == null)
            {
                return(NotFound());
            }

            var output = ViewModelFactory.BoonDetail(boon);

            return(Ok(output));
        }