コード例 #1
0
        private bool DoFind(int id = -1)
        {
            if (id >= 0)
            {
                var prop = new Property()
                {
                    Id = id
                };

                if (helpStructure.TryGetValue(id, out prop))
                {
                    return(hashing.Find(prop).CustomEquals(prop));
                }
                return(false);
            }
            else
            {
                var key  = rnd.Next() % helpStructure.Count;
                var pair = helpStructure.ElementAt(key);
                return(hashing.Find(pair.Value).CustomEquals(pair.Value));
            }
        }
コード例 #2
0
 public Property GetPropertyById(int id)
 {
     return(_context.Find(new Property {
         Id = id
     }));
 }