public User EditCurrentUser(EditUser editUser) { var user = GetAuthorizedUser(); if (editUser.IsFieldSet(nameof(editUser.Bio))) { user.Bio = editUser.Bio; } if (editUser.IsFieldSet(nameof(editUser.AvatarUrl))) { user.AvatarUrl = editUser.AvatarUrl; } user.Edited = DateTime.UtcNow; Db.SaveChanges(); return(user); }