Exemple #1
0
        public async Task <CustomerProfileDto> GetUserProfile()
        {
            string             email = User.Claims.First(c => c.Type == "UserID").Value;
            CustomerProfileDto user  = await _iCustomerManager.GetProfileDetails(email);

            return(user);
        }
        public async Task Edit(CustomerProfileDto customer)
        {
            var customerToEdit = await _repository.GetEntityAsync(q => q.Id.Equals(customer.Id));

            customerToEdit.Image       = customer.Image;
            customerToEdit.FirstName   = customer.FirstName;
            customerToEdit.MiddleName  = customer.MiddleName;
            customerToEdit.LastName    = customer.LastName;
            customerToEdit.PhoneNumber = customer.PhoneNumber;
            customerToEdit.Cash        = customer.Cash;
            _repository.Update(customerToEdit);
            await _repository.SaveChangesAsync();
        }
Exemple #3
0
 public CustomerProfileViewModel(CustomerProfileDto profile)
 {
     _customerProfile = profile;
     LoadTagDepenses();
 }
Exemple #4
0
        //[Authorize]
        public async Task <CustomerProfileDto> Get(string email)
        {
            CustomerProfileDto user = await _iCustomerManager.GetProfileDetails(email);

            return(user);
        }