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;
}
}