public Task <IContactGroup> GetContactGroupAsync(int number) { return(ExecuteAsync(async() => { using ContactGroupModelHandler contactGroupModelHandler = new ContactGroupModelHandler(DbContext, ContactModelConverter.Create()); return await contactGroupModelHandler.ReadAsync(number); }, MethodBase.GetCurrentMethod())); }
public Task <IContactGroup> CreateContactGroupAsync(IContactGroup contactGroup) { NullGuard.NotNull(contactGroup, nameof(contactGroup)); return(ExecuteAsync(async() => { using ContactGroupModelHandler contactGroupModelHandler = new ContactGroupModelHandler(DbContext, ContactModelConverter.Create()); return await contactGroupModelHandler.CreateAsync(contactGroup); }, MethodBase.GetCurrentMethod())); }