Exemplo n.º 1
0
        public IHttpActionResult Get(int?id)
        {
            if (id == null)
            {
                return(BadRequest());
            }
            Mark markEntity = _repo.GetMarkById((int)id);

            if (markEntity == null)
            {
                return(NotFound());
            }
            var mark = new MarkDto()
            {
                Id         = markEntity.Id,
                MarkValue  = markEntity.MarkValue,
                Importance = markEntity.Importance
            };

            return(Ok(mark));
        }