public IBOIdentityUserProfile BOIdentityUserProfile(IIdentityUserProfileRepository repo) { BOIdentityUserProfile boIdentityUserProfile = (BOIdentityUserProfile)BOIdentityUserProfile(); boIdentityUserProfile.Repository = repo; return(boIdentityUserProfile); }
public async Task <IHttpActionResult> DeleteIdentityUserProfile(Int32 id) { var result = Task.Factory.StartNew(() => { IUnitOfWork uow = new UnitOfWorkImp(new IRepositoryConnection[] { IdentityUserProfileRepository }); var bo = new BOIdentityUserProfile(); bo.Repository = IdentityUserProfileRepository; bo.Init(id); uow.Delete(bo); string err; if (!uow.Commit(out err)) { var resp = new HttpResponseMessage(HttpStatusCode.BadRequest) { Content = new StringContent(err) }; throw new HttpResponseException(resp); } return(true); }); await result; if (!result.Result) { return(NotFound()); } return(Ok(result.Result)); }
public IBOIdentityUserProfile BOIdentityUserProfile() { var boIdentityUserProfile = new BOIdentityUserProfile() { UserId = this.UserId, FirstName = this.FirstName, LastName = this.LastName, FullName = this.FullName }; return(boIdentityUserProfile); }