I\'ve added a separate Identification to the AspNetUsers table called NumericId that will serve along with the GUID like ID that ASP has for default.
I\'ve added the
I found this other solution (I am using .NET Core 2.1):
using System;
using System.Collections.Generic;
using System.Diagnostics.Tracing;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Memory;
using YetAnotherERP.Data;
using YetAnotherERP.Entities;
using YetAnotherERP.Exceptions;
using YetAnotherERP.Utils;
namespace YetAnotherERP.Services
{
public class EmployeeRepository : IEmployeeRepository
{
private DataContext _context;
public EmployeeRepository(DataContext dataContext)
{
_context = dataContext;
}
....
public async Task UpdateEmployee(Employee employee)
{
_context.Update(employee).Property(x=>x.Id).IsModified = false;
_context.SaveChanges();
}