Example #1
0
 public static DBData.PizzaUser Map(User user)
 {
     DBData.PizzaUser u = new DBData.PizzaUser();
     u.Username = user.Name;
     if (user.DefLocation == null)
     {
         u.StoreId = -1;
     }
     else
     {
         u.StoreId = user.DefLocation.Id;
     }
     return(u);
 }
Example #2
0
        public static User Map(DBData.PizzaUser user)
        {
            User u;

            if (user.StoreId == -1)
            {
                u = new User(user.Username);
            }
            else
            {
                u = new User(user.Username, Store.GetStore(user.StoreId));
            }
            return(u);
        }