public UsersView GetDetail(int userId, int status = 1) { if (userId <= 0) { return(null); } UsersView users = null; using (var conn = DbConnection(DbOperation.Read)) { var repo = new Repository.UsersRepo(conn); users = repo.GetDetail(userId, status); } return(users); }
public UsersView GetDetail(string userName, int status = 1) { if (string.IsNullOrEmpty(userName)) { return(null); } UsersView users = null; using (var conn = DbConnection(DbOperation.Read)) { var repo = new Repository.UsersRepo(conn); users = repo.GetDetail(userName, status); } return(users); }