public void TestUpdateIssueType()
        {
            using (SqlConnection connection = new SqlConnection(Properties.Settings.Default.SQLConnectionString))
            {
                connection.Open();

                DeleteTables(connection);

                int    ID   = -1;
                string name = "XXXZZZ";

                Create(connection, ID, name);

                string updatedName = "XXXZZZUUU";

                IssueTypeService issueTypeService = new IssueTypeService();
                IssueTypeItem    issueTypeItem    = new IssueTypeItem
                {
                    IssueTypeID   = -1,
                    IssueTypeName = updatedName
                };

                issueTypeService.UpdateIssueType(issueTypeItem);

                int count = GetCount(connection, updatedName);

                Assert.AreEqual(count, 1);
            }
        }
 public ActionResult IssueTypeUpdate([DataSourceRequest] DataSourceRequest request, IssueTypeItem issueTypeItem)
 {
     if (issueTypeItem != null && ModelState.IsValid)
     {
         service.UpdateIssueType(issueTypeItem);
     }
     return(Json(new[] { issueTypeItem }.ToDataSourceResult(request, ModelState)));
 }