public BookLog GetBookLogById(string Id)
        {
            var id = _guid.GetBookLogByGuid(Id);

            try
            {
                return(_context.BookLog.Find(id.Id));
            }
            catch (Exception)
            {
                throw null;
            }
        }
        public TimeTrackerInfo TimeinTimeTracker(string id)
        {
            var bookLog = _guid.GetBookLogByGuid(id);

            if (bookLog != null)
            {
                var timetrack = _mapper.Map <TimeTrackingLogger>(bookLog);
                timetrack.TimeIn         = DateTime.Now.TimeOfDay;
                timetrack.TimeOut        = null;
                timetrack.LogStatus      = (int)LogTypeEnum.TimeIn;
                timetrack.LoggedDateTime = DateTime.Now;

                _context.Add(timetrack);
                _context.SaveChanges();

                var timetrackerDetails = _mapper.Map <TimeTrackerDetails>(timetrack);
                timetrackerDetails.LogStatusName = _method.GetLogTypeName(Convert.ToInt32(timetrackerDetails.LogStatus));

                return(new TimeTrackerInfo()
                {
                    TimeTracker = timetrackerDetails, State = new StatusResponse()
                    {
                        isValid = true
                    }
                });
            }
            else
            {
                return(new TimeTrackerInfo()
                {
                    State = new StatusResponse()
                    {
                        isValid = false, Message = "Can't find Booklog, Check Id."
                    }
                });
            }
        }