public Booking()
 {
     CreateDate = DateTime.Now;
     CreateTime = DateTime.Now.Hour;
     Start = DateTime.Now;
     End = DateTime.Now;
     UserInfo = new UserInfo();
     OBJECTTYPE = "1";
 }
        /// <summary>
        /// User Schedules Summary
        /// </summary>
        /// <param name="context"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<UserInfo> GetUserSummaryAsync(AccessContext context, string id)
        {
            var user = await GetUserAsync(id.ToString());

            IQueryable<Booking> query = context.Bookings.Where(b => b.Userid == id);

            var centerid = await Context.GetCenterIdAsync();// ClaimsPrincipal.Current.CenterId();

            if (centerid.HasValue) query = query.Where(b => b.Field.CenterId == centerid.Value);

            var data = await query.GroupBy(b => b.Status)
                       .Select(g => new
                       {
                           Label = g.Key.ToString(),
                           Count = g.Count(),
                       }).ToListAsync();


            var inf = new UserInfo()
            {
                Email = user.Email,
                Id = user.Id,
                Name = user.Claims.FinUserName(),
                BookingSummary = data.Select(d => new BookingSummary() { Label = d.Label, Count = d.Count }).ToList()
            };

            inf.BookingSummary.Add(new BookingSummary() { Label = "Total", Count = data.Sum(s => s.Count) });

            return inf;

        }