public ActionResult IssueTypeCreate([DataSourceRequest] DataSourceRequest request, IssueTypeItem issueTypeItem)
 {
     if (issueTypeItem != null && ModelState.IsValid)
     {
         service.CreateIssueType(issueTypeItem);
     }
     return(Json(new[] { issueTypeItem }.ToDataSourceResult(request, ModelState)));
 }
        public void TestCreateIssueType()
        {
            using (SqlConnection connection = new SqlConnection(Properties.Settings.Default.SQLConnectionString))
            {
                connection.Open();

                DeleteTables(connection);

                string           name             = "TestIssueType1";
                IssueTypeService issueTypeService = new IssueTypeService();
                IssueTypeItem    issueTypeItem    = new IssueTypeItem
                {
                    IssueTypeName = name
                };

                issueTypeService.CreateIssueType(issueTypeItem);

                int count = GetCount(connection, name);

                Assert.AreEqual(count, 1);
            }
        }