/// <summary> /// Lấy dữ liệu theo id /// </summary> /// <param name="id"></param> /// <returns>ServiceResult</returns> /// Created by Phạm Việt Thắng (22/02/2021) public virtual ServiceResult GetById(int id) { var sqlCommand = $"SELECT * FROM {_className} WHERE {_className}Id = '{id}'"; _serviceResult.Data = _dbConnector.GetFirst <TEntity>(sqlCommand, new { }, System.Data.CommandType.Text); return(_serviceResult); }