ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,745 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
HI All,
I am giving Below my API Model structure
public int organizationNPI { get; set; }
[Required]
public string organizationName { get; set; }
[Required]
public string organizationTIN { get; set; }
[Required]
public string website { get; set; }
public IEnumerable<Location> ?location { get; set; }
public IEnumerable<Contact>? contact { get; set; }
public IEnumerable<Specialities> ?specialities { get; set; }
public IEnumerable<Languages>? languages { get; set; }
As you seeing in model There is some Basic Information and some additional information in List. So i am using different Procedure for inserting these data. Here my question is if fail one of the procedure i want to roll back entire transaction from entire procedure. These procedure calling from DAL file. So How implement transaction this situation from c#
it will depend on which ado.net library you will use. .net 6 does not support the distributed transaction manager, so you should use the same connection, (or join the transaction if supported) and use begin tran / commit tran commands.