public async Task <int> InsertAsync(TEntity entity) { //try { dbSet.Add(entity); return(await context.SaveChangesAsync()); } //catch (Exception ex) { //return -1; } }
public async Task <int> InsertAsync(ApplicationUser entity) { try { entity.AddedDate = DateTime.Now; dbSet.Add(entity); return(await context.SaveChangesAsync()); } catch (Exception e) { Log.Error(e, e.Message); return(-1); } }