How to stop fetching duplicate data in Web API 22019 Community Moderator ElectionHow to get base URL in Web API controller?How do I unit test web api action method when it returns IHttpActionResult?Why Web Api include properties in response that are not projectedHow to implement oauth2 server in ASP.NET MVC 5 and WEB API 2Web API 2 filtering based on a companyWEB API JSON Serializing Circular ReferencesWeb API 2 and EF attach issueASP.NET Web Api 2.0 with Entity framework throws exception when hosted as Web siteWeb api routing with entity frameworkHow to pause Web API ? Is it even possible?
Counting certain elements in lists
Bash replace string at multiple places in a file from command line
What does it mean to make a bootable LiveUSB?
Possible Leak In Concrete
Bash: What does "masking return values" mean?
How to deal with taxi scam when on vacation?
Welcoming 2019 Pi day: How to draw the letter π?
Why is "das Weib" grammatically neuter?
Am I not good enough for you?
How do anti-virus programs start at Windows boot?
Provisioning profile doesn't include the application-identifier and keychain-access-groups entitlements
When do we add an hyphen (-) to a complex adjective word?
I need to drive a 7/16" nut but am unsure how to use the socket I bought for my screwdriver
Replacing Windows 7 security updates with anti-virus?
My adviser wants to be the first author
Meaning of "SEVERA INDEOVI VAS" from 3rd Century slab
How to explain that I do not want to visit a country due to personal safety concern?
Why are there 40 737 Max planes in flight when they have been grounded as not airworthy?
2D counterpart of std::array in C++17
Does this AnyDice function accurately calculate the number of ogres you make unconcious with three 4th-level castings of Sleep?
Ban on all campaign finance?
Schematic conventions for different supply rails
Should we release the security issues we found in our product as CVE or we can just update those on weekly release notes?
Why would a flight no longer considered airworthy be redirected like this?
How to stop fetching duplicate data in Web API 2
2019 Community Moderator ElectionHow to get base URL in Web API controller?How do I unit test web api action method when it returns IHttpActionResult?Why Web Api include properties in response that are not projectedHow to implement oauth2 server in ASP.NET MVC 5 and WEB API 2Web API 2 filtering based on a companyWEB API JSON Serializing Circular ReferencesWeb API 2 and EF attach issueASP.NET Web Api 2.0 with Entity framework throws exception when hosted as Web siteWeb api routing with entity frameworkHow to pause Web API ? Is it even possible?
I want to design RESTfull API where no duplicate data in here.
Here is my context class
public class ReviewDbContext : DbContext
public ReviewDbContext() : base("name=Con")
Database.SetInitializer(new MigrateDatabaseToLatestVersion<ReviewDbContext, ReviewsCalculateSystem.Models.Migrations.Configuration>("Con"));
this.Configuration.LazyLoadingEnabled = false;
//this.Configuration.ProxyCreationEnabled = false;
protected override void OnModelCreating(DbModelBuilder modelBuilder)
modelBuilder.Conventions.Remove<OneToManyCascadeDeleteConvention>();
private void FixEfProviderServicesProblem()
var instance = System.Data.Entity.SqlServer.SqlProviderServices.Instance;
//Here some entity....
I'm facing this error:
The 'ObjectContent`1' type failed to serialize the response body for content type 'application/xml; charset=utf-8'.
And this error is solved to add follow code in my Global.asax file
GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings
.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
GlobalConfiguration.Configuration.Formatters
.Remove(GlobalConfiguration.Configuration.Formatters.XmlFormatter);
reviewerReviewForEachProductById service class
public JsonResult reviewerReviewForEachProductById(int reviewerId, int productId)
var productReviewInfo = db.ReviewerTaskAsigns.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).Select(x => new x.Product, x.ReviewCollectMargin, x.NumberOfReviewCollect ).FirstOrDefault();
//var reviewList = db.Reviews.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).ToList();
return new JsonResult
Data = newproductReviewInfo,
JsonRequestBehavior = JsonRequestBehavior.AllowGet
;
When I hit the above service using Postman
The above service class I add some extra code to do something and I fetching the above error which I solved
public JsonResult reviewerReviewForEachProductById(int reviewerId, int productId)
var productReviewInfo = db.ReviewerTaskAsigns.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).Select(x => new x.Product, x.ReviewCollectMargin, x.NumberOfReviewCollect ).FirstOrDefault();
var reviewList = db.Reviews.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).ToList();
return new JsonResult
Data = new
productReviewInfo,
reviewList
,
JsonRequestBehavior = JsonRequestBehavior.AllowGet
;
When I hit the above service using postman and I see lot of duplicate data are here
"productReviewInfo":
"Product":
"Admin": null,
"ReviewerTaskAsigns": null,
"Reviews": [
"Reviewer": null,
"ReviewId": 3,
"SwapmeetFbProfileLink": "B1",
"SwapmeetProductLink": "B1",
"SwapmeetReviewLink": "B1",
"OwnReviewLink": null,
"ReviewStatus": true,
"isPay": false,
"ProductId": 4,
"ReviewerId": 1
],
"ProductId": 4,
"ProductName": "C# Book",
"ProductAsin": "64dFDF45F",
"ProductLink": "https://www.amazon.com/Healthy-Meal-Prep-Cookbook-Wholesome-ebook/dp/B07492912F/ref=sr_1_1_sspa?s=digital-text&ie=UTF8&qid=1549435615&sr=1-1-spons&keywords=keto+meal+prep&psc=1",
"CurrentStatus": true,
"NumberOfReviewNeed": 30,
"NumberOfReviewCollect": null,
"ReviewStartDate": "2019-02-08T00:00:00",
"ReviewEndDate": null,
"AdminId": 1
,
"ReviewCollectMargin": 20,
"NumberOfReviewCollect": 1
,
"reviewList": [
"Product":
"Admin": null,
"ReviewerTaskAsigns": null,
"Reviews": [],
"ProductId": 4,
"ProductName": "C# Book",
"ProductAsin": "64dFDF45F",
"ProductLink": "https://www.amazon.com/Healthy-Meal-Prep-Cookbook-Wholesome-ebook/dp/B07492912F/ref=sr_1_1_sspa?s=digital-text&ie=UTF8&qid=1549435615&sr=1-1-spons&keywords=keto+meal+prep&psc=1",
"CurrentStatus": true,
"NumberOfReviewNeed": 30,
"NumberOfReviewCollect": null,
"ReviewStartDate": "2019-02-08T00:00:00",
"ReviewEndDate": null,
"AdminId": 1
,
"Reviewer": null,
"ReviewId": 3,
"SwapmeetFbProfileLink": "B1",
"SwapmeetProductLink": "B1",
"SwapmeetReviewLink": "B1",
"OwnReviewLink": null,
"ReviewStatus": true,
"isPay": false,
"ProductId": 4,
"ReviewerId": 1
]
Product and Review model class
public class Product
public int ProductId get; set;
public string ProductName get; set;
public string ProductAsin get; set;
public string ProductLink get; set;
public bool CurrentStatus get; set;
public int NumberOfReviewNeed get; set;
public int? NumberOfReviewCollect get; set;
public DateTime? ReviewStartDate get; set;
public DateTime? ReviewEndDate get; set;
public int AdminId get; set;
public virtual Admin Admin get; set;
public virtual ICollection<Review> Reviews get; set;
public virtual ICollection<ReviewerTaskAsign> ReviewerTaskAsigns get; set;
public class Review
public int ReviewId get; set;
public string SwapmeetFbProfileLink get; set;
public string SwapmeetProductLink get; set;
public string SwapmeetReviewLink get; set;
public string OwnReviewLink get; set;
public bool ReviewStatus get; set;
public bool isPay get; set;
public int ProductId get; set;
public virtual Product Product get; set;
public int ReviewerId get; set;
public virtual Reviewer Reviewer get; set;
How to stop duplicate data fetching?
entity-framework-6 asp.net-web-api2
add a comment |
I want to design RESTfull API where no duplicate data in here.
Here is my context class
public class ReviewDbContext : DbContext
public ReviewDbContext() : base("name=Con")
Database.SetInitializer(new MigrateDatabaseToLatestVersion<ReviewDbContext, ReviewsCalculateSystem.Models.Migrations.Configuration>("Con"));
this.Configuration.LazyLoadingEnabled = false;
//this.Configuration.ProxyCreationEnabled = false;
protected override void OnModelCreating(DbModelBuilder modelBuilder)
modelBuilder.Conventions.Remove<OneToManyCascadeDeleteConvention>();
private void FixEfProviderServicesProblem()
var instance = System.Data.Entity.SqlServer.SqlProviderServices.Instance;
//Here some entity....
I'm facing this error:
The 'ObjectContent`1' type failed to serialize the response body for content type 'application/xml; charset=utf-8'.
And this error is solved to add follow code in my Global.asax file
GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings
.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
GlobalConfiguration.Configuration.Formatters
.Remove(GlobalConfiguration.Configuration.Formatters.XmlFormatter);
reviewerReviewForEachProductById service class
public JsonResult reviewerReviewForEachProductById(int reviewerId, int productId)
var productReviewInfo = db.ReviewerTaskAsigns.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).Select(x => new x.Product, x.ReviewCollectMargin, x.NumberOfReviewCollect ).FirstOrDefault();
//var reviewList = db.Reviews.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).ToList();
return new JsonResult
Data = newproductReviewInfo,
JsonRequestBehavior = JsonRequestBehavior.AllowGet
;
When I hit the above service using Postman
The above service class I add some extra code to do something and I fetching the above error which I solved
public JsonResult reviewerReviewForEachProductById(int reviewerId, int productId)
var productReviewInfo = db.ReviewerTaskAsigns.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).Select(x => new x.Product, x.ReviewCollectMargin, x.NumberOfReviewCollect ).FirstOrDefault();
var reviewList = db.Reviews.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).ToList();
return new JsonResult
Data = new
productReviewInfo,
reviewList
,
JsonRequestBehavior = JsonRequestBehavior.AllowGet
;
When I hit the above service using postman and I see lot of duplicate data are here
"productReviewInfo":
"Product":
"Admin": null,
"ReviewerTaskAsigns": null,
"Reviews": [
"Reviewer": null,
"ReviewId": 3,
"SwapmeetFbProfileLink": "B1",
"SwapmeetProductLink": "B1",
"SwapmeetReviewLink": "B1",
"OwnReviewLink": null,
"ReviewStatus": true,
"isPay": false,
"ProductId": 4,
"ReviewerId": 1
],
"ProductId": 4,
"ProductName": "C# Book",
"ProductAsin": "64dFDF45F",
"ProductLink": "https://www.amazon.com/Healthy-Meal-Prep-Cookbook-Wholesome-ebook/dp/B07492912F/ref=sr_1_1_sspa?s=digital-text&ie=UTF8&qid=1549435615&sr=1-1-spons&keywords=keto+meal+prep&psc=1",
"CurrentStatus": true,
"NumberOfReviewNeed": 30,
"NumberOfReviewCollect": null,
"ReviewStartDate": "2019-02-08T00:00:00",
"ReviewEndDate": null,
"AdminId": 1
,
"ReviewCollectMargin": 20,
"NumberOfReviewCollect": 1
,
"reviewList": [
"Product":
"Admin": null,
"ReviewerTaskAsigns": null,
"Reviews": [],
"ProductId": 4,
"ProductName": "C# Book",
"ProductAsin": "64dFDF45F",
"ProductLink": "https://www.amazon.com/Healthy-Meal-Prep-Cookbook-Wholesome-ebook/dp/B07492912F/ref=sr_1_1_sspa?s=digital-text&ie=UTF8&qid=1549435615&sr=1-1-spons&keywords=keto+meal+prep&psc=1",
"CurrentStatus": true,
"NumberOfReviewNeed": 30,
"NumberOfReviewCollect": null,
"ReviewStartDate": "2019-02-08T00:00:00",
"ReviewEndDate": null,
"AdminId": 1
,
"Reviewer": null,
"ReviewId": 3,
"SwapmeetFbProfileLink": "B1",
"SwapmeetProductLink": "B1",
"SwapmeetReviewLink": "B1",
"OwnReviewLink": null,
"ReviewStatus": true,
"isPay": false,
"ProductId": 4,
"ReviewerId": 1
]
Product and Review model class
public class Product
public int ProductId get; set;
public string ProductName get; set;
public string ProductAsin get; set;
public string ProductLink get; set;
public bool CurrentStatus get; set;
public int NumberOfReviewNeed get; set;
public int? NumberOfReviewCollect get; set;
public DateTime? ReviewStartDate get; set;
public DateTime? ReviewEndDate get; set;
public int AdminId get; set;
public virtual Admin Admin get; set;
public virtual ICollection<Review> Reviews get; set;
public virtual ICollection<ReviewerTaskAsign> ReviewerTaskAsigns get; set;
public class Review
public int ReviewId get; set;
public string SwapmeetFbProfileLink get; set;
public string SwapmeetProductLink get; set;
public string SwapmeetReviewLink get; set;
public string OwnReviewLink get; set;
public bool ReviewStatus get; set;
public bool isPay get; set;
public int ProductId get; set;
public virtual Product Product get; set;
public int ReviewerId get; set;
public virtual Reviewer Reviewer get; set;
How to stop duplicate data fetching?
entity-framework-6 asp.net-web-api2
add a comment |
I want to design RESTfull API where no duplicate data in here.
Here is my context class
public class ReviewDbContext : DbContext
public ReviewDbContext() : base("name=Con")
Database.SetInitializer(new MigrateDatabaseToLatestVersion<ReviewDbContext, ReviewsCalculateSystem.Models.Migrations.Configuration>("Con"));
this.Configuration.LazyLoadingEnabled = false;
//this.Configuration.ProxyCreationEnabled = false;
protected override void OnModelCreating(DbModelBuilder modelBuilder)
modelBuilder.Conventions.Remove<OneToManyCascadeDeleteConvention>();
private void FixEfProviderServicesProblem()
var instance = System.Data.Entity.SqlServer.SqlProviderServices.Instance;
//Here some entity....
I'm facing this error:
The 'ObjectContent`1' type failed to serialize the response body for content type 'application/xml; charset=utf-8'.
And this error is solved to add follow code in my Global.asax file
GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings
.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
GlobalConfiguration.Configuration.Formatters
.Remove(GlobalConfiguration.Configuration.Formatters.XmlFormatter);
reviewerReviewForEachProductById service class
public JsonResult reviewerReviewForEachProductById(int reviewerId, int productId)
var productReviewInfo = db.ReviewerTaskAsigns.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).Select(x => new x.Product, x.ReviewCollectMargin, x.NumberOfReviewCollect ).FirstOrDefault();
//var reviewList = db.Reviews.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).ToList();
return new JsonResult
Data = newproductReviewInfo,
JsonRequestBehavior = JsonRequestBehavior.AllowGet
;
When I hit the above service using Postman
The above service class I add some extra code to do something and I fetching the above error which I solved
public JsonResult reviewerReviewForEachProductById(int reviewerId, int productId)
var productReviewInfo = db.ReviewerTaskAsigns.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).Select(x => new x.Product, x.ReviewCollectMargin, x.NumberOfReviewCollect ).FirstOrDefault();
var reviewList = db.Reviews.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).ToList();
return new JsonResult
Data = new
productReviewInfo,
reviewList
,
JsonRequestBehavior = JsonRequestBehavior.AllowGet
;
When I hit the above service using postman and I see lot of duplicate data are here
"productReviewInfo":
"Product":
"Admin": null,
"ReviewerTaskAsigns": null,
"Reviews": [
"Reviewer": null,
"ReviewId": 3,
"SwapmeetFbProfileLink": "B1",
"SwapmeetProductLink": "B1",
"SwapmeetReviewLink": "B1",
"OwnReviewLink": null,
"ReviewStatus": true,
"isPay": false,
"ProductId": 4,
"ReviewerId": 1
],
"ProductId": 4,
"ProductName": "C# Book",
"ProductAsin": "64dFDF45F",
"ProductLink": "https://www.amazon.com/Healthy-Meal-Prep-Cookbook-Wholesome-ebook/dp/B07492912F/ref=sr_1_1_sspa?s=digital-text&ie=UTF8&qid=1549435615&sr=1-1-spons&keywords=keto+meal+prep&psc=1",
"CurrentStatus": true,
"NumberOfReviewNeed": 30,
"NumberOfReviewCollect": null,
"ReviewStartDate": "2019-02-08T00:00:00",
"ReviewEndDate": null,
"AdminId": 1
,
"ReviewCollectMargin": 20,
"NumberOfReviewCollect": 1
,
"reviewList": [
"Product":
"Admin": null,
"ReviewerTaskAsigns": null,
"Reviews": [],
"ProductId": 4,
"ProductName": "C# Book",
"ProductAsin": "64dFDF45F",
"ProductLink": "https://www.amazon.com/Healthy-Meal-Prep-Cookbook-Wholesome-ebook/dp/B07492912F/ref=sr_1_1_sspa?s=digital-text&ie=UTF8&qid=1549435615&sr=1-1-spons&keywords=keto+meal+prep&psc=1",
"CurrentStatus": true,
"NumberOfReviewNeed": 30,
"NumberOfReviewCollect": null,
"ReviewStartDate": "2019-02-08T00:00:00",
"ReviewEndDate": null,
"AdminId": 1
,
"Reviewer": null,
"ReviewId": 3,
"SwapmeetFbProfileLink": "B1",
"SwapmeetProductLink": "B1",
"SwapmeetReviewLink": "B1",
"OwnReviewLink": null,
"ReviewStatus": true,
"isPay": false,
"ProductId": 4,
"ReviewerId": 1
]
Product and Review model class
public class Product
public int ProductId get; set;
public string ProductName get; set;
public string ProductAsin get; set;
public string ProductLink get; set;
public bool CurrentStatus get; set;
public int NumberOfReviewNeed get; set;
public int? NumberOfReviewCollect get; set;
public DateTime? ReviewStartDate get; set;
public DateTime? ReviewEndDate get; set;
public int AdminId get; set;
public virtual Admin Admin get; set;
public virtual ICollection<Review> Reviews get; set;
public virtual ICollection<ReviewerTaskAsign> ReviewerTaskAsigns get; set;
public class Review
public int ReviewId get; set;
public string SwapmeetFbProfileLink get; set;
public string SwapmeetProductLink get; set;
public string SwapmeetReviewLink get; set;
public string OwnReviewLink get; set;
public bool ReviewStatus get; set;
public bool isPay get; set;
public int ProductId get; set;
public virtual Product Product get; set;
public int ReviewerId get; set;
public virtual Reviewer Reviewer get; set;
How to stop duplicate data fetching?
entity-framework-6 asp.net-web-api2
I want to design RESTfull API where no duplicate data in here.
Here is my context class
public class ReviewDbContext : DbContext
public ReviewDbContext() : base("name=Con")
Database.SetInitializer(new MigrateDatabaseToLatestVersion<ReviewDbContext, ReviewsCalculateSystem.Models.Migrations.Configuration>("Con"));
this.Configuration.LazyLoadingEnabled = false;
//this.Configuration.ProxyCreationEnabled = false;
protected override void OnModelCreating(DbModelBuilder modelBuilder)
modelBuilder.Conventions.Remove<OneToManyCascadeDeleteConvention>();
private void FixEfProviderServicesProblem()
var instance = System.Data.Entity.SqlServer.SqlProviderServices.Instance;
//Here some entity....
I'm facing this error:
The 'ObjectContent`1' type failed to serialize the response body for content type 'application/xml; charset=utf-8'.
And this error is solved to add follow code in my Global.asax file
GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings
.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
GlobalConfiguration.Configuration.Formatters
.Remove(GlobalConfiguration.Configuration.Formatters.XmlFormatter);
reviewerReviewForEachProductById service class
public JsonResult reviewerReviewForEachProductById(int reviewerId, int productId)
var productReviewInfo = db.ReviewerTaskAsigns.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).Select(x => new x.Product, x.ReviewCollectMargin, x.NumberOfReviewCollect ).FirstOrDefault();
//var reviewList = db.Reviews.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).ToList();
return new JsonResult
Data = newproductReviewInfo,
JsonRequestBehavior = JsonRequestBehavior.AllowGet
;
When I hit the above service using Postman
The above service class I add some extra code to do something and I fetching the above error which I solved
public JsonResult reviewerReviewForEachProductById(int reviewerId, int productId)
var productReviewInfo = db.ReviewerTaskAsigns.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).Select(x => new x.Product, x.ReviewCollectMargin, x.NumberOfReviewCollect ).FirstOrDefault();
var reviewList = db.Reviews.Where(x => x.ReviewerId == reviewerId && x.ProductId == productId).ToList();
return new JsonResult
Data = new
productReviewInfo,
reviewList
,
JsonRequestBehavior = JsonRequestBehavior.AllowGet
;
When I hit the above service using postman and I see lot of duplicate data are here
"productReviewInfo":
"Product":
"Admin": null,
"ReviewerTaskAsigns": null,
"Reviews": [
"Reviewer": null,
"ReviewId": 3,
"SwapmeetFbProfileLink": "B1",
"SwapmeetProductLink": "B1",
"SwapmeetReviewLink": "B1",
"OwnReviewLink": null,
"ReviewStatus": true,
"isPay": false,
"ProductId": 4,
"ReviewerId": 1
],
"ProductId": 4,
"ProductName": "C# Book",
"ProductAsin": "64dFDF45F",
"ProductLink": "https://www.amazon.com/Healthy-Meal-Prep-Cookbook-Wholesome-ebook/dp/B07492912F/ref=sr_1_1_sspa?s=digital-text&ie=UTF8&qid=1549435615&sr=1-1-spons&keywords=keto+meal+prep&psc=1",
"CurrentStatus": true,
"NumberOfReviewNeed": 30,
"NumberOfReviewCollect": null,
"ReviewStartDate": "2019-02-08T00:00:00",
"ReviewEndDate": null,
"AdminId": 1
,
"ReviewCollectMargin": 20,
"NumberOfReviewCollect": 1
,
"reviewList": [
"Product":
"Admin": null,
"ReviewerTaskAsigns": null,
"Reviews": [],
"ProductId": 4,
"ProductName": "C# Book",
"ProductAsin": "64dFDF45F",
"ProductLink": "https://www.amazon.com/Healthy-Meal-Prep-Cookbook-Wholesome-ebook/dp/B07492912F/ref=sr_1_1_sspa?s=digital-text&ie=UTF8&qid=1549435615&sr=1-1-spons&keywords=keto+meal+prep&psc=1",
"CurrentStatus": true,
"NumberOfReviewNeed": 30,
"NumberOfReviewCollect": null,
"ReviewStartDate": "2019-02-08T00:00:00",
"ReviewEndDate": null,
"AdminId": 1
,
"Reviewer": null,
"ReviewId": 3,
"SwapmeetFbProfileLink": "B1",
"SwapmeetProductLink": "B1",
"SwapmeetReviewLink": "B1",
"OwnReviewLink": null,
"ReviewStatus": true,
"isPay": false,
"ProductId": 4,
"ReviewerId": 1
]
Product and Review model class
public class Product
public int ProductId get; set;
public string ProductName get; set;
public string ProductAsin get; set;
public string ProductLink get; set;
public bool CurrentStatus get; set;
public int NumberOfReviewNeed get; set;
public int? NumberOfReviewCollect get; set;
public DateTime? ReviewStartDate get; set;
public DateTime? ReviewEndDate get; set;
public int AdminId get; set;
public virtual Admin Admin get; set;
public virtual ICollection<Review> Reviews get; set;
public virtual ICollection<ReviewerTaskAsign> ReviewerTaskAsigns get; set;
public class Review
public int ReviewId get; set;
public string SwapmeetFbProfileLink get; set;
public string SwapmeetProductLink get; set;
public string SwapmeetReviewLink get; set;
public string OwnReviewLink get; set;
public bool ReviewStatus get; set;
public bool isPay get; set;
public int ProductId get; set;
public virtual Product Product get; set;
public int ReviewerId get; set;
public virtual Reviewer Reviewer get; set;
How to stop duplicate data fetching?
entity-framework-6 asp.net-web-api2
entity-framework-6 asp.net-web-api2
asked Mar 7 at 12:24
Ahasanul BannaAhasanul Banna
297
297
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55043742%2fhow-to-stop-fetching-duplicate-data-in-web-api-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55043742%2fhow-to-stop-fetching-duplicate-data-in-web-api-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown