zzz projects Entity Framework Core EF Core
Home Articles Knowledge Base Online Examples
  • Home
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework Core - Knowledge Base (KB)

24 results in tag: json

"The expected lock file doesn't exist. Please run "dnu restore"" right after I have done so

I'm running beta7 for everything, including EF 7. I'm trying to connect to my remote existing database using the ASP.NET 5 Application template project. My project.json looks like this:...{ "webroot": "wwwroot", "userSecretsId": "aspnet5-XXX-409e9e37-...
asp.net-core c# dnx entity-framework-core json
asked by Antrim

Configuring Oracle Database Access in EF7

I'm following the Pluralsight course on ...Building a Web App with ASP.NET 5, MVC 6, EF7 and AngularJS... and I'm having trouble configuring the Database connections to an exisiting Oracle Database. ...The tool I'm using is ...Visual Studio Code..., scaff...
asp.net asp.net-mvc entity-framework-core json oracle
asked by JSG_85

Cant get ASP.NET MVC 6 Controller to return JSON

I have an MVC 6 project in which i am using Fiddler to test out Web API. If i take the following controller action which uses EntityFramework 7 to return a List. Then the html will render fine....[HttpGet("/")] public IActionResult Index() { var model...
asp.net-core-mvc asp.net-web-api c# entity-framework-core json
asked by Dblock247

Entity Framework Core 1.0.0 Disable Eager/Lazy Loading

Can't seem to find any mention of this for EF Core. I've found examples to disable lazy loading in prior EF versions. I have an asp.net core, MVC6, Web Api, and AngularJS site I'm working on. ...In the app, I have a table Members and a table MemberStateAc...
asp.net-core asp.net-web-api2 entity-framework-core json lazy-loading
asked by T. Lee

Why is the command 'add-migration' not accepting my installed packages in project.json?

After installing the microsoft.entityframework.tools -Pre/ and microsoft.entityframework.sqlserver, when using add-migration "InitialCreate", I have an error stating "build failed". Even when trying to explicitly build the project, it fails. ...This is th...
asp.net c# entity-framework entity-framework-core json
asked by naz786

Entity Framework Core - How to correctly map relationships with composite key?

I have the following table structure...Facility...Id int (PK) Name ...Visit...FacilityId int Hour int Value ...Table ...Visit... has the composite key ...(FacilityId, Hour)...The entity classes are defined as ...class Facility { public int Id { get;...
c# entity-framework-core json
asked by rams

.net Core 2.0 Web API - Newtonsoft.Json.JsonSerializationException - IQueryable

I have two separate .net core applications, Web API and client. I get the model using:...public IEnumerable<OhaMedication> GetOhaMedication() { return _context.OhaMedication; } ...The model:...public class OhaMedication { public int OhaMedication...
asp.net-core-webapi c# entity-framework-core json
asked by hncl

REST API returns "bad array" instead of JSON object

I'm building REST API server in .NET core. I'm testing my code via Postman software. I have a problem with ...Include()... method that enables me to attach navigation property data. I'm trying to get data in [HttpGet] action and objects that are being ret...
asp.net-core-webapi entity-framework-core json postman
asked by Dear Deer

Parse JSON Object / Array of Strings into new Custom Class

I'm trying to parse some JSON data and ultimatley store it in a database....I'm having issues when storing a collection of strings / values which are not objects themselves....For example - The "callingCodes" & "altSpellings"...I want to store these in an...
c# entity-framework entity-framework-core json json.net
asked by Andrew Birks

retrieve json with entityframework core

I have store procedures returning json, thanks to ...for json path.... ...How do you consume them with entity-framework-core?...The following doesn't work:...var foo = _db.Set<JObject>() .FromSql("dbo.Mine @customerid = {0}", _user.guid) ...
entity-framework-core for-json json sql-server
asked by Max Favilli

C# Entity Framework returning broken JSon when using Include in DbSet

I'm trying to make a simple one-to-many relationship in C# using Entity Framework Core, the problem resembles a circular reference problem but no exception is being thrown. ...My model classes are:...[Table("Restaurantes")] public class Restaurante { ...
c# entity-framework-core json
asked by Fabiotk

Serialize EF Core InMemory Database to JSON

I'm looking forward to extract delta changes tons of entities in DbContext, and delegate actual DB commit to background process, say Azure web job....Attempted this, but couldn't serialize.... var deltaJson = ""; try { v...
c# ef-core-2.0 entity-framework entity-framework-core json
asked by Abhijeet

JSON serialization Value Conversion not tracking changes with EF Core

I am using an EF Core value conversion....https://docs.microsoft.com/en-us/ef/core/modeling/value-conversions...I wrote a JSON serializer converter as follows: ...private static ValueConverter<T, String> JsonValueConverter<T>() { ValueConverter<T, Str...
ef-core-2.1 entity-framework-core json
asked by Dave Loukola

Entity Framework Core to Json Ignore ReferenceLoop - Parent Child

I having entity class with parent-child relationship that having problem serializing to json using newtonsoft json.net...public class Department { [Key] public int DepartmentId { get; set; } public int? ParentId { get; set; }...
asp.net-core c# entity-framework-core json serialization
asked by Sarin Na Wangkanai

Newtonsoft.Json AttributeProvider does not provide runtime added custom attributes

I did write a model generator to create an interface between client ViewModels and server Models....Some model classes are serialize with ...[JsonObject(MemberSerialization.OptIn)]... attribute and their properties are marked with ...[JsonProperty ...]...
c# entity-framework-core json json.net
asked by Mohammad

getJSON method returns 'undefined' in jquery

I am working on an Asp.net core 2.1 project and have the below model...Person...public class Person { [Key] public int ID { get; set; } [Required] [MaxLength(150)] public string Name { get; set; } [Required] [MaxLength(150)] ...
asp.net-core asp.net-core-webapi entity-framework-core jquery json
asked by topcool

C# Entity Framework Json deserialize String array issues

I have A Json file Which can be used for deserialize to Entity framework. For simplify we can assume the Json like this...{ "stat": "val0", "results": [ { "datasets": [ "val1", "val2" ], "head": "val3" }, ...
c# deserialization entity-framework entity-framework-6 json
asked by Tekin Güllü

How can a JSON_VALUE be converted to a DateTime with EF Core 2.2?

I am mapping ...JSON_VALUE... using the technique from ...How to write DbFunction's translation.... Since not all values in the JSON are strings, conversion is sometimes necessary....When converting to ...int..., everything is fine:...var results = contex...
c# ef-core-2.2 entity-framework-core json sql-server
asked by Rich Bennema

How to save entity and avoid creating of new model, using EF?

I have a model:...public class PersonModel { [Key] [JsonProperty("ix")] [XmlElement("ix")] public int Index { get; set; } [XmlElement("content")] public ContentModel Content { get; set; } } [XmlRoot(ElementName = "content")] publ...
asp.net-core c# entity-framework-core json xml
asked by user8532173

Error occurred while access Microsoft.Extensions.HostingServices. Could not parse JSON file

I was trying to create a migration for an MVC ASP.NET Core 3.10 project using Visual Studio 2019. I got two errors:...An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: ...
asp.net-mvc c# entity-framework-core json visual-studio-2010
asked by Tespy

Page 1 of 2
  • 1
  • 2
  • ยป

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!