public T GetCentaUnitById <T>(string unitId) where T : CentaUnitType { string funMsg = "function: GetCentaUnitById<T>(string unitId)" + FileUtility.NewLine + _ClassMsg; try { DataRow row = _DbService.GetUnitById(unitId); return(ConvertUtility.Row2Model <T>(row)); } catch (Exception ex) { string exMsg = "Exception: " + ex.Message + FileUtility.NewLine + funMsg; throw new Exception(exMsg, ex.InnerException); } }