Example #1
0
        /// <summary>
        /// Get the offer associated with this LivrETS ID.
        /// </summary>
        /// <returns>An Offer or null if not found.</returns>
        public Offer GetOffer()
        {
            Offer offer = null;

            using (var repo = new LivrETSRepository())
            {
                offer = repo.GetOfferAssociatedWith(userLivrETSID: SellerLivrETSID, andArticleLivrETSID: ArticleLivrETSID);
            }
            return(offer);
        }
Example #2
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                _repository?.Dispose();
                _repository = null;
            }

            base.Dispose(disposing);
        }
Example #3
0
        /// <summary>
        /// Get the seller associated with this LivrETS ID.
        /// </summary>
        /// <returns>An ApplicationUser or null of not found.</returns>
        public ApplicationUser GetSeller()
        {
            ApplicationUser user = null;

            using (var repo = new LivrETSRepository())
            {
                user = repo.GetUserBy(LivrETSID: SellerLivrETSID);
            }

            return(user);
        }
Example #4
0
 public HomeController(LivrETSRepository livretsRepository)
 {
     Repository = livretsRepository;
 }