public static T_CoefArea InsertarCoefArea(int i) { var _worksheet = ImportarExcel.GetWorkSheetByName("BaseDatos"); var _value = _worksheet.GetSingleCellValue(i, 7); using (var db = new DB_PLANTILLA()) { T_CoefArea _coef = new T_CoefArea() { Value = _value }; var _record = db.GetSingleRecord <T_CoefArea>(x => x.Value == _coef.Value); if (_record == null) { db.AddElemento(_coef.GetType(), _coef); } else { _coef = _record; } return(_coef); } }
public static CoefArea ToProject(this T_CoefArea t_coefArea) { CoefArea _coefArea = new CoefArea() { Value = t_coefArea.Value }; return(_coefArea); }