I am working on a web api project, where client application will send bulk records to api to update into db. I am using C# and Entity framework.
Client application will send list of records
[
'DAD88F3D-518E-47CC-A5D9-33E15D8373A7',
'B3960124-34CF-445C-A1A7-3F1ABB383C01',
'6883E1BE-218E-499E-AC6D-13E9E7D099A9',
'A2B6D337-A615-4269-9C0F-D24D2479012B',
'A2B6D337-A615-4269-9C0F-D24D2479012B',
'4950C8EC-A6CC-42B7-AD2A-E029E7FCF11A',
'C1C477BD-B1DF-45D6-85C4-A381DC596524',
'C1C477BD-B1DF-45D6-85C4-A381DC596524',
'4938EB64-C795-46B9-B42D-D48F32AD8DF4'
]
This list would have approx 100 records at a time.
So API has to update multiple db tables with all matching Ids in the list and returns status back to client for each Ids that which Update operation is success and which is failed. Client application has to do some operation based on success or failed status.
Update tableName set Deleted = 'Y' where id in (above list )
Update anotherTableName set enrollment='Incomplete' where id in (above list)
So how it can be done in entity framework for more records update.