Beispiel #1
0
 public SquareCustomerListItem(
     MSquare_CustomerSummary mCustomerSummary,
     IApplicationLocale locale)
 {
     MCustomerSummary = mCustomerSummary;
     Locale           = locale;
 }
        public SquareCustomerListItem CreateSquareCustomerListItem(MSquare_CustomerSummary mSummary)
        {
            var model = new SquareCustomerListItem(mSummary, Locale);

            return(model);
        }
Beispiel #3
0
            public static AUser_User AUser_User(AspNetUser user, MOrder_OrderSummaryList mOrderSummaryList, MSquare_CustomerSummary mSquareCustomerSummary, MSquare_PaymentSummaryList mSquarePaymentSummaryList)
            {
                var roles = user.AspNetUserRoles.Select(r => r.Role.NormalizedName).ToList();

                var loginProviders = user.AspNetUserLogins.Select(r => r.LoginProvider).ToList();

                var aUser = new AUser_User()
                {
                    UserId               = user.Id,
                    UserName             = user.UserName,
                    Email                = user.Email,
                    EmailConfirmed       = user.EmailConfirmed,
                    PhoneNumber          = user.PhoneNumber,
                    PhoneNumberConfirmed = user.PhoneNumberConfirmed,
                    TwoFactorEnabled     = user.TwoFactorEnabled,
                    LockoutEnabled       = user.LockoutEnabled,
                    AccessFailedCount    = user.AccessFailedCount,
                    Roles                = roles,
                    LoginProviders       = loginProviders,
                    MOrders              = mOrderSummaryList,
                    MSquareCustomer      = mSquareCustomerSummary,
                    MSquarePayments      = mSquarePaymentSummaryList
                };

                return(aUser);
            }