class manages user groups
        public IHttpActionResult deleteGroup(int id)
        {
            IHttpActionResult ret = null;
            Group group = new Group();

            if (id >= 0 && group.deleteGroup(id))
                ret = Ok(); // implement delete record from DB
            else
                ret = NotFound();
            return ret;
        }
 public IHttpActionResult getGroups()
 {
     IHttpActionResult ret = null;
     Group userGroups = new Group(UserSessionData.userId);
     List<Group> groups = userGroups.getGroups();
     if (groups.Any() || groups.Count == 0)
     {
         ret = Ok(groups);
     }
     else
     {
         ret = NotFound();
     }
     return ret;
 }
 public IHttpActionResult getGroupData(int groupId)
 {
     IHttpActionResult ret = null;
     Group userGroups = new Group(UserSessionData.userId);
     Group group = userGroups.getGroupData(groupId);
     if (group != null)
     {
         ret = Ok(group);
     }
     else
     {
         ret = NotFound();
     }
     return ret;
 }
        public IHttpActionResult getGroups(string groupName)
        {
            IHttpActionResult ret = null;
            Group group = new Group(groupName);

            if (group.checkGrouName())
            {
                ret = Ok();
            }
            else
            {
                ret = NotFound();
            }
            return ret;
        }
 public IHttpActionResult saveGroup(Group group)
 {
     IHttpActionResult ret = null;
     if (group.saveGroup())
         ret = Ok(group); //need to return newly generated id for this group
     else
         ret = NotFound();
     return ret;
 }