public CouponDto GetDetail(int id, int userId) { if (id <= 0) { return(null); } using (var cxt = DbContext(DbOperation.Read)) { var repo = new CouponRepo(cxt); return(repo.GetDetail(id, userId)); } }