/// <summary> /// Obtener cantidad de registros de Sancion /// Autor: Jair Guerrero /// Fecha: 2020-12-05 /// </summary> public int Count() { try { IRepository <Person> repo = new PersonRepo(context); return(repo.Count()); } catch (Exception ex) { throw new Exception(ex.Message, ex.InnerException); } }
/// <summary> /// Obtener cantidad de registros de Sancion según filtro /// Autor: Jair Guerrero /// Fecha: 2020-12-05 /// </summary> public int Count(Expression <Func <PersonAM, bool> > predicate) { try { var where = mapper.MapExpression <Expression <Func <Person, bool> > >(predicate); IRepository <Person> repo = new PersonRepo(context); return(repo.Count(where)); } catch (Exception ex) { throw new Exception(ex.Message, ex.InnerException); } }