protected async System.Threading.Tasks.Task Load() { var mimmMysqlGetTracksResult = await MimmMysql.GetTracks(); getTracksForidtracksResult = mimmMysqlGetTracksResult; song = new MimmClientBlazor.Models.MimmMysql.Song(); }
public async Task <Models.MimmMysql.Song> CancelSongChanges(Models.MimmMysql.Song item) { var entity = context.Entry(item); entity.CurrentValues.SetValues(entity.OriginalValues); entity.State = EntityState.Unchanged; return(item); }
public async Task <Models.MimmMysql.Song> CreateSong(Models.MimmMysql.Song song) { OnSongCreated(song); context.Songs.Add(song); context.SaveChanges(); return(song); }
protected async System.Threading.Tasks.Task Form0Submit(MimmClientBlazor.Models.MimmMysql.Song args) { try { var mimmMysqlCreateSongResult = await MimmMysql.CreateSong(song); DialogService.Close(song); } catch (Exception mimmMysqlCreateSongException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to create new Song!"); } }
public async Task <Models.MimmMysql.Song> UpdateSong(int?id, Models.MimmMysql.Song song) { OnSongUpdated(song); var item = context.Songs .Where(i => i.id == id) .First(); var entry = context.Entry(item); entry.CurrentValues.SetValues(song); entry.State = EntityState.Modified; context.SaveChanges(); return(song); }
partial void OnSongUpdated(Models.MimmMysql.Song item);
partial void OnSongGet(Models.MimmMysql.Song item);
partial void OnSongDeleted(Models.MimmMysql.Song item);
protected async System.Threading.Tasks.Task Grid0RowSelect(MimmClientBlazor.Models.MimmMysql.Song args) { var result = await DialogService.OpenAsync <EditSong>("Edit Song", new Dictionary <string, object>() { { "id", args.id } }); await InvokeAsync(() => { StateHasChanged(); }); }