Sum Decimal Value got problem

Jerry Lipan 916 Reputation points
2022-03-04T08:52:27.12+00:00

Hi,

I've model as following,

  public class FigureNameGet  
    {  
        [Key]  
        public string Id { get; set; }  
  
        public string FigureNameId { get; set; }  
  
        public string Val1{ get; set; }  
        public decimal Val1InDecimal { get; set; }  
        public string Val2 { get; set; }  
        public decimal Val2InDecimal { get; set; }  
    }  

My code return successfully as following. 2 rows

180008-04032022-001.png

Decimal value = 500000
180030-04032022-002.png

Decimal value = 2770001.00
180052-04032022-003.png

Why it not sum ?

180061-04032022-004.png

Please help. I'm stuck

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 questions
0 comments No comments
{count} votes

3 additional answers

Sort by: Most helpful
  1. Sreeju Nair 12,176 Reputation points
    2022-03-04T09:02:31.16+00:00

    what is the value of Val1InDecimal for second record? It seems the Val1InDecimal for second record is 2270001.00, if that is the case, it is doing the sum operation.

    0 comments No comments

  2. Jerry Lipan 916 Reputation points
    2022-03-04T09:12:40.43+00:00

    Hi @Sreeju Nair

    See this,

    All is 2 rows.

    1st row
    180072-04032022-00x.png

    2nd row
    180081-04032022-00y.png

    Why it is not sum ?

    0 comments No comments

  3. Jerry Lipan 916 Reputation points
    2022-03-04T11:17:37.35+00:00

    Hi @Sreeju Nair

    it's correct. hahaha. Confuse between 2270001 and 2770001

    0 comments No comments