New ID RRS feed

  • Question


    I have the following function in my repo class, if I create an Customer object pass it in, how would I get the newly generated identity ID?

    public async Task<int> AddAsync<T>(T t) where T : class
                return await _context.SaveChangesAsync();

    Monday, November 2, 2015 4:28 PM