Another strange problem...

Curious Cat 21 Reputation points
2022-11-01T12:40:44.427+00:00

I am entering data into a table. During this (In the OnPostAsync scope), I do send an query to an another table, to obtain a missing data that doesn't is included in the data which comes the from.
But at each try i get a strange rendered result.
It says :
Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1[OtoServisWeb.Models.Stoklar]
What do I wrong ?
Below is the part where i got the issue :

public IEnumerable<Stoklar> Stoklar { get; set; } // Same result also with IList....  

public async Task<IActionResult> OnPostAsync()  
        {  
            var stokkod = YedekParca.StokKod; // This value comes from the form....  
            var stokadi = _appDbContext.Stoklar.Where(s => s.StokKod == stokkod); // here the query....  
  
            YedekParca.StokAd = Convert.ToString(stokadi); // and with this i add to Db Table....  
  
                _appDbContext.YedekParca.Add(YedekParca);  
                await _appDbContext.SaveChangesAsync();  
  
                return RedirectToPage("CreateReport", new { id = YedekParca.IsId });  
        }  

And in the DB Table i find this instead my value :
Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1[OtoServisWeb.Models.Stoklar

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
697 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,156 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,252 questions
{count} votes