3
Answers

Save Range of models

Photo of Guest User

Guest User

4y
614
1
How can I save a list of products  in entityframework? 
this code doesnt work for me..
 
public async Task<Guid> CreateRangeAsync(List<ProductModel> models)
{
await _context.Products.AddRangeAsync( models);
await _context.SaveChangesAsync();
}

Answers (3)