예제 #1
0
        public T Find(object id)
        {
            try
            {
                return(_context.Set <T>().Find(id));
            }
            catch (Exception ex)
            {
                BStatus.ErrorOnFind(_context.Set <T>().GetType().Name, ex.Message);
            }

            return(null);
        }
예제 #2
0
        public T First(Func <T, bool> query)
        {
            try
            {
                return(_context.Set <T>().FirstOrDefault(query));
            }
            catch (Exception ex)
            {
                BStatus.ErrorOnFind(_context.Set <T>().GetType().Name, ex.Message);
            }

            return(null);
        }