コード例 #1
0
        public TopFive Update(UpdateTopFive topFive)
        {
            var parameters = new
            {
                Name         = topFive.Name,
                Description  = topFive.Description,
                ParentId     = topFive.ParentId,
                AuthorId     = topFive.AuthorId,
                DepartmentId = topFive.DepartmentId,
                Id           = topFive.Id
            };

            Query(d => d.Query <int>(
                      @"
UPDATE TopFives
SET Name = @Name, Description = @Description, ParentId = @ParentId, AuthorId = @AuthorId, DepartmentId = @DepartmentId
WHERE Id = @Id",
                      parameters));

            return(GetByIds(new[] { topFive.Id }).Single());
        }
コード例 #2
0
 public TopFive Update(UpdateTopFive topFive)
 {
     return(_repo.Update(topFive));
 }