0

Is there a name for the pattern in which business objects contain their own persistence mechanism? For example:

public class Customer
{
    public string Name { get; set; }
    public int Id { get; set; }

    public void Save()
    {
        // save to database
    }
}

I'm not an advocate of this design - I'm just curious if there is a name for it.

RoccoC5
  • 4,185
  • 16
  • 20

1 Answers1

1

Active record pattern

amit_g
  • 30,880
  • 8
  • 61
  • 118