示例#1
0
        public int CreateBook(CreateBookParameters parameters)
        {
            return(new SqlQuery(Settings).ExecuteNonQuery(
                       query: "CreateBook",
                       parameters: _ =>
            {
                if (parameters == null)
                {
                    return;
                }

                _.AddWithValue("@AppUserId", parameters.AppUserId);
                _.AddWithValue("@Title", parameters.Title);
                _.AddWithValue("@Author", parameters.Author);
                _.AddWithValue("@Comment", parameters.Comment);
            }
                       ));
        }
示例#2
0
 public Book Create(CreateBookParameters parameters)
 {
     throw new System.NotImplementedException();
 }
示例#3
0
 public ActionResult <Book> Create(CreateBookParameters parameters)
 {
     return(Created("", Service.Create(parameters)));
 }