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)

35 results in tag: aspnetboilerplate

ASPNETBOILERPLATE - App service method not returning related entities in .NET Core

I am in the process of converting my .NET MVC5 template into .NET Core MVC template of ASPNETZERO. So all the code I am converting is working just as I need in my MVC5 template solution. My method code is shown below.... public async Task<EditCompanyDto>...
aspnetboilerplate c# entity-framework-core
asked by exlnt

How to use a varchar column other than Id for PK?

I have a table which has ...Code... as PK, but I get the exception below in ...DefaultEditionCreator.cs... once I try to run the application....[Table("Test")] public class Test: FullAuditedEntity<string> { [DatabaseGenerated(DatabaseGeneratedOption.I...
asp.net-boilerplate aspnetboilerplate c# entity-framework-core primary-key
asked by vivek nuna

Add-Migration Created Columns Alphabetically Asp.Net Core 2.0

I have created a model and run command Add-Migration in PMC. it created columns in alphabetically order in migration. After updating database sqlserver table are also in alphabetically order. I want the same order which i used in my original model instead...
asp.net-core-2.0 aspnetboilerplate c# entity-framework-core
asked by Shahid Malik

Foreign key reference object is returning null

I am referencing the ...AbpUser... table in an entity with the following property definition:...[ForeignKey("LocationManagerId")] public virtual User LocationManager { get; set; } public virtual long LocationManagerId { get; protected set; } ...My DTO is ...
asp.net-core aspnetboilerplate c# entity-framework-core navigation-properties
asked by Jonas Vachal

The instance of entity type 'xTestType' cannot be tracked because another instance of this type with the same key is already being tracked?

I'm trying to delete multiple rows from a table. But it gives the following error after the first iteration. I can see primary key ...Id... as ...0... on all the ...xTestType... object. that might be the issue. Why is it always giving ...Id...0.......fore...
asp.net-core aspnetboilerplate c# entity-framework entity-framework-core
asked by vivek nuna

Cannot insert explicit value for identity column while updating entity

I am using ASP.NET Boilerplate template....I want to update ...Details... table, which contains more than one item. If an item exists, it must update, otherwise a new one must be added and all other entries relating to ...Master... primary key in ...Detai...
aspnetboilerplate entity-framework entity-framework-6 identity-insert
asked by Nighil

UnitofWork [aspnetboilerplate] Transaction Management

I am currently working on implementing aspnetboilerplate's transaction management...Below is the method I am using to insert a order and products associated with the order...public class OrderController { IOrderAppService _orderAppService; public ...
aspnetboilerplate entity-framework entity-framework-6 transactions
asked by Vijayakumar Natarajan

Multi-tenant authentication, IMustHaveTenant entity in ASP.NET Boilerplate Module Zero

Multi-Tenant Authentication...I have created a new tenant from the swagger UI as an admin and I can check in the data ...the tenant created successfully together with admin account.......Now how do I login as the admin of the newly created tenant?...Cos I...
asp.net-core-2.0 aspnetboilerplate c# entity-framework-core multi-tenant
asked by Kelvin Wei Minn

Update-Database command is missing in EF Core

Downloaded .NET Core template v3.4.0...From VS2017 Package Manager Console, I tried to autocomplete ...Update-Database... command but this command does not exist!...https://imgur.com/a/MqA0a
.net-core aspnetboilerplate ef-migrations entity-framework entity-framework-core
asked by alex

EF Core - adding/updating entity and adding/updating/removing child entities in one request

I am struggling with what seemed to be a couple of basic operations....Let's say I've got a class named Master:...public class Master { public Master() { Children = new List<Child>(); } public int Id { get; set; } public strin...
asp.net-core aspnetboilerplate c# entity-framework entity-framework-core
asked by Dejan Janjušević

Retrieve child entities from CrudAppService in ABP

The ...GetAll... and ...Get... methods of the ready-made ...CrudAppService... don't include child entities....Is it possible to modify its behaviour?...Update...GetAllIncluding... has some problem if the included entity has a navigation property to the pa...
asp.net-core aspnetboilerplate c# entity-framework-core parent-child
asked by alex

Can I use EF Core 2.0 'AsNoTracking' in CRUD service GetAll?

I have an Application Service that implements:...public interface IPracticeAppService : IAsyncCrudAppService<PracticeDto, int, PagedAndSortedResultRequestDto,CreatePracticeDto, PracticeDto> ...I would like to use ...AsNoTracking.......In the example below...
asp.net-core aspnetboilerplate c# entity-framework entity-framework-core
asked by Jazb

Database operation expected to affect 1 row(s) but actually affected 0 row(s)

I'm trying to insert records in two tables, but getting the exception. Could you please help me to resolve the issue....First I tried the below code....await _testRepository.InsertAsync(test); await _xyzRepository.InsertAsync(xyz); ...Then I tried this co...
asp.net-core aspnetboilerplate c# ef-code-first entity-framework-core
asked by vivek nuna

ASP.NET Boilerplate project structure for new entities/services

I have started to play around with ASP.NET Boilerplate framework. I want to keep my application-specific entities and services in two separate projects. This will keep the core framework project untouched....However I am not sure if i have the entities in...
architecture asp.net-core aspnetboilerplate ef-migrations entity-framework-core
asked by user2058413

.ToListAsync() not found when using WhereIf

I am reading ...this tutorial.... I want to use ...async... query with EF Core....It works well when i use like this:...var tasks = await _taskRepository .GetAll() //.WhereIf(!string.IsNullOrEmpty(input?.Title), x => x.Title.Contains(input.Title))...
aspnetboilerplate c# entity-framework-core linq
asked by Mahmut Gundogdu

how to update the multiple rows at a time in aspnetboilerplate?

I want to execute the SQL clause like:...UPDATE table_name SET column1 = value1, column2 = value2, ... WHERE condition; ...Because I want to update multiple rows in database. But I don't know how to implement this.
asp.net-core aspnetboilerplate entity-framework-core sql
asked by zhengkai wang

How to update or delete related collections?

I'm using Abp version 3.6.2, ASP.Net Core 2.0 and ...free startup template... for multi-page web application. I have following data model:...public class Person : Entity<Guid> { public Person() { Phones = new HashSet<PersonPhone>(); } ...
asp.net-core aspnetboilerplate c# entity-framework-core repository-pattern
asked by XelaNimed

How to create a Repository with EF core for a Value object in asp.net Boilerplate

I have created a second dbContext using the ABP .net core startup template. This all works fine, but the second dbContext is only used to extract data out of a view....I have a class that maps to the view, but this view has no primary key. And ...if... it...
aspnetboilerplate c# entity-framework-core
asked by gijswijs

Repository fetching data only in some cases

I have a ASPNET Boilerplate project; the piece of code below is executed both from a service and from a background job... private readonly IRepository<UserTeam> _userTeamsRepository; [...] public List<UserTeam> GetUsers(){ var defaultUs...
asp.net-core aspnetboilerplate c# entity-framework-core
asked by gvdm

Using automapper.collection in aspnet core & ef core doesn't updated edited records in a collection

I'm using asnet boilerplaite aspnet core and ef core. I've initialized automapper.collection in PreInitialize as follows:...Configuration.Modules.AbpAutoMapper().Configurators.Add( cfg =>{ cfg.AddCollectionMappers(); cfg.CreateMap<Orde...
asp.net-core aspnetboilerplate automapper collections entity-framework-core
asked by DLedge

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!