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)

8 results in tag: dto

Mapping entities to DTOs without duplicated code

I'm trying to get my head around this issue where I am using the Entity Framework (6) in an N-tier application. Since data from the repository (which contains all communication with the database) should be used in a higher tier (the UI, services etc), I n...
c# dto entity-framework entity-framework-6
asked by Bo Mortensen

automapper unflatten excludes value from parent object

I've a situation where entity framework core (2.0) is performing additional work to a parent table when I update a row in a child table. I've pin-pointed the cause to a value not being set in the unflattened object tree produced by AutoMapper (I'm not say...
automapper dto entity-framework-core repository
asked by Craig

Handling relations when mapping DTOs to EF entities

In my DTOs, I send Ids instead of entire objects to assign/relate one object to another. The problem is my mapping code will need access to the database to handle this because my entity classes don't have ...BarId... property....public class FooDTO { ...
asp.net-core-webapi automapper c# dto entity-framework-core
asked by Konrad

How do I restrict the number of columns used in an INSERT when using EntityFramework?

Let's say you have an Entity with 26 columns. It matches the corresponding table which also has 26 columns....From time to time I would like to be able to send fewer columns in an INSERT (Add) operation than are specified in the entity because of certain...
dto entity-framework entity-framework-6 entity-framework-core
asked by ezG

Should one perform a calculation in a DTO model or in the destination entity model?

I'm currently creating various entities in ASP.NET Core 2.2 with accompanying DTOs for a Web API. The client application would submit a DTO object to the relevant controller action. There using the AutoMapper, this would be mapped from the DTO object to a...
asp.net-core c# dto entity-framework entity-framework-core
asked by ProgrammerMan

Is This How to Create a Data Transfer Object (DTO) with Entity Framework Core & ASP.NET Core MVC 2.2+ and 3.0

In creating a RESTful Api with ASP.NET Core MVC 2.2 I noticed there wasn't a a DTO example like the 2014 web api example. ...ASP.NET Core MVC 2.2 Rest api 2019 example...ASP.NET web-api 2014 example...So, I decided to create DTO's for a few of my controll...
asp.net asp.net-core c# dto entity-framework-core
asked by Christian Matthew

Map DTO to Entity

These are my ...Entities...: In this scenario, each user can make a ...Post.... Each post can have a list of ...Items... and each item can have a list of users that Tagged in it....public class Post { public int Id { get; set; } public int UserId ...
asp.net-core c# dto entity entity-framework-core
asked by Saeid Amini

How to map a list of related DTOs in a DTO: Nesting DTO mapping

Suppose you have a fully defined relationship of books and authors in a large database with many other relationships...public class Book { public int Id { get; set; } public string Title { get; set; } ... Public int AuthorId { get; set; } P...
asp.net-core c# dto entity-framework-core linq-to-sql
asked by marno11

Page 1 of 1
  • 1

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!