Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 874411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:06:00+00:00 2026-05-15T11:06:00+00:00

I am building a library using mvc, mongodb and asp.net membership. When a user

  • 0

I am building a library using mvc, mongodb and asp.net membership.

When a user browses the site logged in (logged out is auto set to preview) I need to check if they have purchased the current movie and if they have they can see the full set of features otherwise they have to purchase the video or watch the preview.

I have a Movie model below:

public Guid Id { get; set; }
public string Slug { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public double Price { get; set; }
public string PreviewUrl { get; set; }
public string MovieUrl { get; set; }
public DateTime CreatedOn { get; set; }
public string CreatedBy { get; set; }
public DateTime ModifiedOn { get; set; }

public IEnumerable<User> Users;

public Movie() {
    Id = Guid.NewGuid();
    CreatedOn = DateTime.Now;
    ModifiedOn = DateTime.Now;
}

Maybe there is a better method to approach this. Maybe an order or something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:06:00+00:00Added an answer on May 15, 2026 at 11:06 am

    I’m going to suggest a very basic solution. Assuming that you keep track of purchases somewhere in the DB (be it MongoDB or not) you could write a routine that queries the purchases by the id of the user and the id of the movie. So essentially you always keep track of who has purchased what thus giving yourself the ability to know if a person has purchased a movie using on simple query like I’ve illustrated bellow:

    Purchases table:

    RecordID  UserID  MovieID
    1         10      233
    2         89      720
    

    Query

    db.purchases.find({'UserId': 10}, {'MovieID' : 233})
    

    Should return

    RecordID  UserID  MovieID
    1         10      233    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a webapp using Tapestry in combination with Spring Security and the jQuery-library
I'm using NUnit 2.5 and NAnt 0.85 to compile a .NET 3.5 library. Because
I'm building up a library of filters for a validation class in PHP, some
I'm building a class library that will have some public & private methods. I
I'm building the world's simplest library application. All I want to be able to
Intel's Threading Building Blocks (TBB) open source library looks really interesting. Even though there's
I am building an application as a library, but to make sure I can
I am currently building a Neural Network library. I have constructed it as an
I am looking for an open source library in Java for parsing and building
I am building a suite of applications, each its own MVC solution/project, between these

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.