public void UpdateListingComment(ListingComment listingComment) { ListingComment targetListingComment = context.ListingComments.Find(listingComment.ListingCommentID); if (targetListingComment != null) { targetListingComment.Comment = listingComment.Comment; targetListingComment.IsEdited = listingComment.IsEdited; targetListingComment.LastEdited = listingComment.LastEdited; targetListingComment.ListingID = listingComment.ListingID; targetListingComment.PostDate = listingComment.PostDate; targetListingComment.UserID = listingComment.UserID; } }
public void DeleteListingComment(int listingCommentId) { ListingComment listingComment = context.ListingComments.Find(listingCommentId); context.ListingComments.Remove(listingComment); }
public void InsertListingComment(ListingComment listingComment) { context.ListingComments.Add(listingComment); }