//Save Staff Task
        public async Task <int> SaveStaffTask(StaffTask staffTask)
        {
            if (staffTask.Id == 0)
            {
                _context.StaffTask.Add(staffTask);
            }
            else
            {
                StaffTask st = _context.StaffTask.Find(staffTask.Id);

                if (st != null)
                {
                    st.TaskName    = staffTask.TaskName;
                    st.Description = staffTask.Description;
                    _context.StaffTask.Update(st);
                }
            }
            try
            {
                var result = await _context.SaveChangesAsync();

                return(result);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        // Delete Staff Task
        public int DeleteStaffTask(int id)
        {
            StaffTask st = _context.StaffTask.Find(id);

            if (st != null)
            {
                _context.StaffTask.Remove(st);
            }
            try
            {
                var res = _context.SaveChanges();
                return(res);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }