Esempio n. 1
0
        public static UserAddressModel GetAddressForUser(int userAccountId)
        {
            using (var _context = new bbbsDbContext())
            {
                var userAddress = (from address in _context.UserAddresses
                                   join contactinfo in _context.ContactInfo on address.Id equals contactinfo.UserAddressId
                                   join useraccount in _context.UserAccounts on userAccountId equals useraccount.Id
                                   select address
                                   ).FirstOrDefault();

                return(TransformHelpers.ModelToAddress(userAddress));
            }
        }