Scheduler Not showing Database values

Hi,
not showing appointment dates in the scheduler
Componenent Page

using Syncfusion.Blazor.Schedule
@using BlazorAppDemo.Data 
@using BlazorAppDemo.Data.service
@inherits ExampleBase
   
 
   
       
           
       
   
     
           
       
   


Component Base:


 public class ExampleBase : ComponentBase
    {
        
        [Inject]
        protected Example_Service Service { get; set; }
        protected List DataSource = new List();
        protected override async Task OnInitializedAsync()
        {
            DataSource = await Service.GetScheduleData();
        }
    }



Service Page


 public class Example_Service
    {
        private  ApplicationDbContext _context;
        public Example_Service(ApplicationDbContext context)
        {
            _context = context;
        }
        public async Task CreateAppointmentAsync(Appointment obj)
        {
            _context.Appointments.Add(obj);
            _context.SaveChanges();
            return await Task.FromResult(obj);
        }
         public  async Task > GetScheduleData()
        {
            List appData =await _context.Appointments.ToListAsync();
            return appData;
        }
    }



3 Replies 1 reply marked as answer

RV Ravikumar Venkatesan Syncfusion Team August 31, 2020 01:51 PM UTC

Hi Jyothi, 

Greetings from Syncfusion support. 

We have validated your reported query “Scheduler Not showing Database values” and checked the problem with the below sample but we are not able to replicate the issue. Kindly refer to the below sample for more reference. 



Kindly check the above and if you still face the problem kindly share us more details to serve you better. 

Regards, 
Ravikumar Venkatesan 



JL jyothi lekshmi September 1, 2020 08:23 AM UTC

Hi,
Thank you for your reply, but the link you provided isn't loading.
Used your scheduler(server side blazor) for appointment booking,but its not fetch the data from database(sql server). Could you please share a sample code for fetch data from database. 
 Thank you for your support.



RV Ravikumar Venkatesan Syncfusion Team September 2, 2020 04:42 AM UTC

Hi Jyothi, 

Sorry for the inconvenience caused. 

We have prepared a runnable Schedule sample with DB for your reference and it can be available below. 


Kindly try the above sample and get back to us if you need any further assistance. 

Regards, 
Ravikumar Venkatesan 


Marked as answer
Loader.
Up arrow icon