public async override Task Handle(UpdateAccountHeaderServiceRequest request) { var account = await AccountConext.Accounts .Include(model => model.Address) .Include(model => model.Login) .SingleAsync(model => model.Login.Username == request.AccountUsername); account.UpdateHeader( request.FirstName, request.MiddleName, request.LastName, request.BirthDay, request.Gender); await AccountConext.Save(); }
public override async Task Handle(UpdateAccountAddressServiceRequest request) { var account = await AccountConext.Accounts .Include(model => model.Address) .Include(model => model.Login) .SingleAsync(model => model.Login.Username == request.AccountUsername); account.UpdatetAddress( request.Street, request.City, request.ZipCode, request.Region, request.Phone, request.Email); await AccountConext.Save(); }