This question is locked. New answers and comments are not allowed.
I have a ton of extensions to extend the collections in the base context
ex
(works great)
However, how do I write an extension on a Navigation Collection Property of a specific object.
So Submission has a collection called SubmissionResponses. I want to have an extension work like this
Instead of what I can do now which is
ex
/// <summary>
/// Gets a single submission entry by ID
/// </summary>
/// <param name="submissionID">Id of the submission</param>
/// <returns>Deli.Forms.Model.Submission</returns>
public
static
Deli.Forms.Model.Submission Get(
this
IQueryable<Deli.Forms.Model.Submission> submissions, Guid submissionID) {
return
submissions.FirstOrDefault(x => x.SubmissionID == submissionID);
}
However, how do I write an extension on a Navigation Collection Property of a specific object.
So Submission has a collection called SubmissionResponses. I want to have an extension work like this
submission.SubmissionResponses.Get(<guid>);
Instead of what I can do now which is
submission.GetResponse(<guid>);