/// <summary> /// Saves (or updates) the entity in the database. /// </summary> /// /// <param name="userContext"> /// User context. /// </param> /// /// <param name="entity"> /// Entity to save or update. /// </param> /// /// <param name="options"> /// Optional options. /// </param> /// /// <returns> /// The number of affected rows. /// </returns> public int Save(IUserContext userContext, ref VahapYigit.Test.Models.ExecutionTrace entity, SaveOptions options = null) { using (var et = new ExecutionTracerService(tag: entity.State.ToString())) using (var db = new ExecutionTraceCrud(userContext)) { return(db.Save(ref entity, options)); } }