© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
19 replies
Ice_

❔ Entity Framework. Rental list

I have a class for books and I have a class of customers. I also have a class for loans.
The books should be possible to be loaned by other customers as well but only after the loaner has given it back and the loaner can choose themselves how many days they want to loan the book, a maximum of a week though.

The loans class should be a junction table, I assume this is a many-to-many relation?

I can figure out the relation-stuff in EF but I'm unsure how to check the timespan between date1 and date2. It's of course of type DateTime. It seems like I can use calculus to calculate the datetimes but how would this look like with either Linq or with a lambda expression?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Entity framework overwriting List works?
C#CC# / help
6mo ago
Entity framework
C#CC# / help
14mo ago
❔ Entity Framework
C#CC# / help
3y ago
❔ Entity Framework
C#CC# / help
4y ago