本文整理汇总了C#中IContactRepository类的典型用法代码示例。如果您正苦于以下问题:C# IContactRepository类的具体用法?C# IContactRepository怎么用?C# IContactRepository使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IContactRepository类属于命名空间,在下文中一共展示了IContactRepository类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddressBookViewModel
public AddressBookViewModel(IContactRepository repository)
{
AddNewContactCommand = new DelegateCommand(parameter => ExecuteAddNewContact(), parameter => CanExecuteAddNewContact());
SaveContactCommand = new DelegateCommand(parameter => ExecuteSaveContact(), parameter => CanExecuteSaveContact());
Contacts = new ObservableCollection<Contact>(repository.GetContacts());
}
示例2: ContactFolderContactsController
public ContactFolderContactsController(IContactFolderRepository contactfolderRepository, ICompanyRepository companyRepository, IContactRepository contactRepository, IContactFolderContactRepository contactfoldercontactRepository)
{
this.contactfolderRepository = contactfolderRepository;
this.companyRepository = companyRepository;
this.contactRepository = contactRepository;
this.contactfoldercontactRepository = contactfoldercontactRepository;
}
示例3: ContactService
public ContactService(IContactAuthenticationHandler authenticationHandler,IContactRepository contactRepository,
IContactSecondaryRepository secondaryContactRepository,
IContactSynchroniser contactSynchroniser
)
{
if (contactRepository == null)
{
throw new ArgumentNullException("contactRepository");
}
_contactRepository = contactRepository;
if (secondaryContactRepository == null)
{
throw new ArgumentNullException("secondaryContactRepository");
}
_secondaryContactRepository = secondaryContactRepository;
if (authenticationHandler == null)
{
throw new ArgumentNullException("authenticationHandler");
}
_authenticationHandler = authenticationHandler;
if (contactSynchroniser == null)
{
throw new ArgumentNullException("contactSynchroniser");
}
_contactSynchroniser = contactSynchroniser;
}
示例4: ContactViewModelBuilder
public ContactViewModelBuilder(IContactRepository contactRepository, ICostCentreRepository costCentreRepository, IContactTypeRepository contactTypeRepository, IUserRepository userRepository)
{
_contactRepository = contactRepository;
_costCentreRepository = costCentreRepository;
_contactTypeRepository = contactTypeRepository;
_userRepository = userRepository;
}
示例5: RegisterController
public RegisterController(IContactRepository contacts, IStoreRepository stores,
IContactQueue queue)
{
contactRepository = contacts;
storeRepository = stores;
contactQueue = queue;
}
示例6: ContactService
static ContactService()
{
ContactService.unitOfWork = new UnitOfWork();
ContactService.repository =
RepositoryFactory.GetRepository<IContactRepository,
Contact>(ContactService.unitOfWork);
}
示例7: CompanyEmailsController
public CompanyEmailsController(ICompanyRepository companyRepository, IContactRepository contactRepository, IUserRepository userRepository, ICompanyEmailRepository companyemailRepository)
{
this.companyRepository = companyRepository;
this.contactRepository = contactRepository;
this.userRepository = userRepository;
this.companyemailRepository = companyemailRepository;
}
示例8: Create
public ActionResult Create(Contact contact, IContactRepository contacts)
{
if (contact.Name != "123")
{
this.ModelState.AddModelError("Name", "Must be 123");
}
if (!this.ModelState.IsValid)
{
return View();
}
//Contact contact = new Contact();
//UpdateModel(contact);
//if (string.IsNullOrEmpty(contact.Name))
//{
//}
//
// Update database
//
return View();
}
示例9: JobAppService
/// <summary>
///In constructor, we can get needed classes/interfaces.
///They are sent here by dependency injection system automatically.
/// </summary>
public JobAppService(IJobRepository jobRepository, UserManager userManager, IAccountRepository accountRepository, IContactRepository contactrepository)
{
_jobRepository = jobRepository;
_userManager = userManager;
_accountRepository = accountRepository;
_contactRepository = contactrepository;
}
示例10: EnquiriesController
public EnquiriesController(IContactRepository contactRepository, IAddressRepository addressRepository, IEnquiryRepository enquiryRepository, IStatusRepository statusRepository, IEnquiryDetailsRepository enquiryDetailsRepository)
{
this.contactRepository = contactRepository;
this.addressRepository = addressRepository;
this.enquiryRepository = enquiryRepository;
this.statusRepository = statusRepository;
this.enquiryDetailsRepository = enquiryDetailsRepository;
}
示例11: ContactController
public ContactController(IUnitOfWork uow, IContactRepository ContactRepository,
IUserAccountRepository DefineUserRepository)
{
_uow = uow;
_RContact = ContactRepository;
_RDefineUser = DefineUserRepository;
EDefineUser = new UserAccountExtentions(_RDefineUser);
EContact = new ContactExtensions(_RContact, _RDefineUser);
}
示例12: ContactController
public ContactController(IContactRepository repository, string catalog, LoginView view)
{
this._LoginId = view.LoginId.To<long>();
this._UserId = view.UserId.To<int>();
this._OfficeId = view.OfficeId.To<int>();
this._Catalog = catalog;
this.ContactRepository = repository;
}
示例13: ContactHandler
/// <summary>
/// DI
/// </summary>
/// <param name="contactRepository"></param>
/// <param name="contactFactory"></param>
/// <param name="entityRepository"></param>
public ContactHandler(
IContactRepository contactRepository,
IContactFactory contactFactory,
IEntityRepository<IEndowmentEntity> entityRepository)
{
_contactRepository = contactRepository;
_contactFactory = contactFactory;
_entityRepository = entityRepository;
}
示例14: ContactCalendarEventsHub
public ContactCalendarEventsHub(IContactRepository contactRepository, IEnumerable<ICalendarProvider> calendarProviders, ILoginProvider sessionProvider, ILoggerFactory loggerFactory)
{
Debug.Print("ContactCalendarEventsHub.ctor()");
_contactRepository = contactRepository;
_calendarProviders = calendarProviders.ToArray();
_sessionProvider = sessionProvider;
_logger = loggerFactory.CreateLogger(GetType());
_logger.Trace("ContactCalendarEventsHub.ctor(calendarProviders:{0})", string.Join(",", _calendarProviders.Select(cp=>cp.GetType().Name)));
}
示例15: AccountsController
public AccountsController(IContactRepository contactRepository, IAddressRepository addressRepository, IEnquiryRepository enquiryRepository, IStatusRepository statusRepository, IEnquiryDetailsRepository enquiryDetailsRepository, IClientRegisterRepository clientRegisterRepository)
{
this.contactRepository = contactRepository;
this.addressRepository = addressRepository;
this.enquiryRepository = enquiryRepository;
this.statusRepository = statusRepository;
this.enquiryDetailsRepository = enquiryDetailsRepository;
this.clientRegisterRepository = clientRegisterRepository;
}