/// <summary> /// Obtener cantidad de registros de services /// Autor: Jair Guerrero /// Fecha: 2021-02-20 /// </summary> public int Count() { try { IRepository <Services> repo = new ServicesRepo(context); return(repo.Count()); } catch (Exception ex) { throw new Exception(ex.Message, ex.InnerException); } }
/// <summary> /// Obtener cantidad de registros de services según filtro /// Autor: Jair Guerrero /// Fecha: 2021-02-20 /// </summary> public int Count(Expression <Func <ServicesAM, bool> > predicate) { try { var where = mapper.MapExpression <Expression <Func <Services, bool> > >(predicate); IRepository <Services> repo = new ServicesRepo(context); return(repo.Count(where)); } catch (Exception ex) { throw new Exception(ex.Message, ex.InnerException); } }