DynamicModel.Clone() Method
.NET Standard 2.x
Creates a new DynamicModel
object which is a copy of the current DynamiclModel
instance.
Namespace: SnapObjects.Data
Assembly: SnapObjects.Data.dll
Syntax
public DynamicModel Clone()
Returns
Returns a copy of the current DynamiclModel
instance.
Examples
The following code example creates a copy of an existing DynamicModel
object.
using SnapObjects.Data;
namespace Appeon.ApiDoc.DynamicModelExamples
{
public class CloneExample
{
private readonly SchoolContext _context;
public CloneExample(SchoolContext dataContext)
{
// Sets the data context
_context = dataContext;
}
public void Example()
{
string sql;
sql = "select * from Course";
DynamicModel dynamicModel =
_context.SqlExecutor.SelectOne<DynamicModel>(sql);
// Creates a copy of the DynamicModel object
DynamicModel m = dynamicModel.Clone();
}
}
}
Applies to
.NET Standard
2.x