コード例 #1
0
        public static WebConfig SingleOrDefault(Expression <Func <WebConfig, bool> > expression)
        {
            var       repo    = GetRepo();
            var       results = repo.Find(expression);
            WebConfig single  = null;

            if (results.Count() > 0)
            {
                single = results.ToList()[0];
                single.OnLoaded();
                single.SetIsLoaded(true);
                single.SetIsNew(false);
            }

            return(single);
        }