/// <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); }
protected override void Dispose(bool disposing) { if (disposing) { _repository?.Dispose(); _repository = null; } base.Dispose(disposing); }
/// <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); }
public HomeController(LivrETSRepository livretsRepository) { Repository = livretsRepository; }