/// <summary> /// The GetAllGroup /// </summary> /// <returns>The <see cref="ActionResult"/></returns> public ActionResult GetAllGroup() { try { List <Group> data = _provider.getAllGroup(); List <Object> lstResult = new List <Object>(); foreach (var item in data) { lstResult.Add(new { ID = item.ID, Name = item.Name, Descriptions = item.Descriptions, Created = item.Created, CreatorID = item.CreatorID, Modified = item.Modified, Modifier = item.Modifier }); } return(Json(new { success = true, content = lstResult.ToArray() }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { success = false, content = ex.Message.ToString() }, JsonRequestBehavior.AllowGet)); } }
public void TcGetAllGroup() { Assert.IsNotNull(_provider.getAllGroup()); }