public override void ExecuteResult(ControllerContext context) { if (this.Data != null) { context.HttpContext.Response.Clear(); var oa = new Csla.Data.ObjectAdapter(); var ds = new DataSet(); oa.Fill(ds, this.TableName, this.Data); var xs = new System.Xml.Serialization.XmlSerializer(ds.GetType()); context.HttpContext.Response.ContentType = "text/xml"; xs.Serialize(context.HttpContext.Response.Output, ds); } }
public override void ExecuteResult(ControllerContext context) { if (this.Data != null) { context.HttpContext.Response.Clear(); var oa = new Csla.Data.ObjectAdapter(); var ds = new DataSet(); oa.Fill(ds, this.TableName, this.Data); var xs = new System.Xml.Serialization.XmlSerializer(ds.GetType()); context.HttpContext.Response.ContentType = "text/xml"; xs.Serialize(context.HttpContext.Response.Output, ds); } }