3
Answers

Save Range of models

Guest User

Guest User

4y
590
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)