コード例 #1
0
        public IHttpActionResult Delete(int id)
        {
            logger.Write($"[DELETE] (Paintings) /{id}", LogLevel.INFO);
            Painting painting = db.Get(id);

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

            db.Delete(id);
            return(StatusCode(HttpStatusCode.NoContent));
        }
コード例 #2
0
 public void Delete(long id)
 {
     repository.Delete(id);
 }