[CSHARP-2638] Truncation resulted in data loss when Sum (Linq) Created: 14/Jun/19 Updated: 25/Jun/20 Resolved: 25/Jun/20 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Linq |
| Affects Version/s: | 2.8.0, 2.8.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mini Dev | Assignee: | Wan Bachtiar |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Good morning, I'm face with this issue: I have property Total in my MongoDB stored as Double type. I get all Total as IQueryable<decimal> in my c# code and I call Sum but I received this error: Truncation resulted in data loss Code is: var foo = bar.GetCollection<MyClass>("MyCollectionName").AsQueryable() This not works
This problem there is not if I use IEnumerable: var foo = bar.GetCollection<MyClass>("MyCollectionName").AsQueryable() This works
|
| Comments |
| Comment by Rachelle Palmer [ 25/Jun/20 ] | |
|
Hi there, thank you for reaching out to MongoDB. As this sounds more like a support issue, I wanted to give you some resources to get this question answered more quickly:
Thank you! | |
| Comment by Mini Dev [ 02/Jul/19 ] | |
|
I solved with the following attribute:
|