oclockvn
1/20/2017 - 8:29 AM

copy properties

copy properties

public int DoSomeThing(FooModel foo)
{
    // copy from FooModel to Foo
    Foo f = new Foo
    {
        Id = foo.Id,
        Name = foo.Name
    };

    // do something

    return 0;
}