protected async System.Threading.Tasks.Task Load() { canEdit = true; var mimmMysqlGetUserByemailResult = await MimmMysql.GetUserByemail($"{email}"); user = mimmMysqlGetUserByemailResult; }
public async Task <Models.MimmMysql.User> CancelUserChanges(Models.MimmMysql.User item) { var entity = context.Entry(item); entity.CurrentValues.SetValues(entity.OriginalValues); entity.State = EntityState.Unchanged; return(item); }
public async Task <Models.MimmMysql.User> CreateUser(Models.MimmMysql.User user) { OnUserCreated(user); context.Users.Add(user); context.SaveChanges(); return(user); }
protected async System.Threading.Tasks.Task Form0Submit(MimmClientBlazor.Models.MimmMysql.User args) { try { var mimmMysqlCreateUserResult = await MimmMysql.CreateUser(user); DialogService.Close(user); } catch (Exception mimmMysqlCreateUserException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to create new User!"); } }
public async Task <Models.MimmMysql.User> UpdateUser(string email, Models.MimmMysql.User user) { OnUserUpdated(user); var item = context.Users .Where(i => i.email == email) .First(); var entry = context.Entry(item); entry.CurrentValues.SetValues(user); entry.State = EntityState.Modified; context.SaveChanges(); return(user); }
protected async System.Threading.Tasks.Task Load() { user = new MimmClientBlazor.Models.MimmMysql.User(); }
protected async System.Threading.Tasks.Task Grid0RowSelect(MimmClientBlazor.Models.MimmMysql.User args) { var result = await DialogService.OpenAsync <EditUser>("Edit User", new Dictionary <string, object>() { { "email", args.email } }); await InvokeAsync(() => { StateHasChanged(); }); }
partial void OnUserUpdated(Models.MimmMysql.User item);
partial void OnUserGet(Models.MimmMysql.User item);
partial void OnUserDeleted(Models.MimmMysql.User item);