Esempio n. 1
0
        public TEntity Get(TPrimaryKey id)
        {
            var list   = CommonHelper.GetProperties(default(TEntity));
            var fields = string.Join(",", list);
            var sql    = $"select {fields} from {tableName} where Id=@Id";

            return(_sqlHelper.FirstOrDefault <TEntity>(_unitOfWork.Connection, sql, new { Id = id }));
        }