コード例 #1
0
 /// <summary>
 /// while adding new customer, search database to ckeck if the store is existed
 /// when the customer type in favorite store
 /// </summary>
 /// <param name="storeId"></param>
 /// <returns></returns>
 public l.Store CheckIfStoreExists(int storeId)
 {
     d.Store store = dbcontext.Store.Find(storeId);
     if (store == null)
     {
         return(null);
     }
     else
     {
         l.Store storeFind = Mapper.MapStore(store);
         return(storeFind);
     }
 }
コード例 #2
0
        public void StoreTest()
        {
            l.Store store = new l.Store
            {
                StoreId   = 1,
                StoreName = "GCS",
                City      = "AR",
                Postal    = "76010"
            };

            Assert.Equal(1, store.StoreId);
            Assert.Equal("GCS", store.StoreName);
            Assert.Equal("AR", store.City);
            Assert.Equal("76010", store.Postal);
        }