Exemple #1
0
        public IHttpActionResult Delete([FromBody] Posts posts)
        {
            try
            {
                postsDAo.Delete(posts);
            }
            catch (Exception e)
            {
                throw e;
            }

            return(Ok());
        }
        public IHttpActionResult Delete(int id)
        {
            try
            {
                Posts post = new Posts();
                post.Id = id;
                postsDAo.Delete(post);
            }
            catch (Exception e)
            {
                throw e;
            }

            return(Ok());
        }