Naming convention for a database interacting class

Is there such a thing as a standard naming convention for a class that interacts with the database (CRUD stuff or duplication check). Now I just called him an assistant, for example, called the class "Subscriptions" A, which interacts with this table will be called "SubscriptionHelper"

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LoopinWineBackOffice.Helper
{
    public class SubscriberHelper
    {
        public static bool IsEmailAlreadyInUsed(string email)
        {
            using (var dc = new LoopinWiineContainer())
            {
               return dc.Subscribers.Any(item => item.Email==email.Trim());
            }
        }
    }
}

My sample code looks something like this.

+5
source share
2 answers

In my experience [and no offense], when classes start to get names, such as "Helper" and "Manager", because the purpose of this class was not clearly defined (and I was guilty of this in the past myself).

, , ad-hoc SQL "SubscriptionHelper".

, , , SubscriptionRepository, .

, - , , . , , , , , , , , .

: http://martinfowler.com/eaaCatalog/, , , .

+9

, ,

, Table Data Gateway, " " : , , .

Table Data Gateway: , . http://martinfowler.com/eaaCatalog/tableDataGateway.html

+3

All Articles