示例#1
0
        protected async override Task OnInitializedAsync()
        {
            _events = await EventDataService.GetAll();

            if (EventId == 0)
            {
                Event = await EventDataService.Add(new Event());
            }
            else
            {
                Event = _events.FirstOrDefault(e => e.EventId == EventId);
            }
        }