public string AttendanceSave(LocationAttendance model)
        {
            var userid = _httpContextAccessor.HttpContext.User.GetLoggedInUserId <string>();

            if (string.IsNullOrEmpty(userid))
            {
                throw new InvalidOperationException("User Not found");
            }
            CoreSQLConnection CoreSQL   = new CoreSQLConnection();
            ArrayList         arrayList = new ArrayList();
            var sqlQuery = "exec prc_AttCheckInOut '" + userid + "','" + model.Type + "','" + model.CheckInLatitude + "', '" + model.CheckInLongitude + "', N'" + model.CheckInAddress.Replace("'", "`") + "'";

            arrayList.Add(sqlQuery);
            CoreSQL.CoreSQL_SaveDataUseSQLCommand(arrayList);
            return("Success");
        }
 public IActionResult AttendanceSave([FromBody] LocationAttendance model)
 {
     try
     {
         if (_attendanceQuery.AttendanceSave(model) == "Success")
         {
             return(Ok());
         }
         else
         {
             return(BadRequest("Save Failed !!!"));
         }
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }