public HttpResponseMessage AddUserToEntity(Guid userId, Guid entityId) { try { TakeDocService.Parameter.Interface.IEntityService servEntity = Utility.MyUnityHelper.UnityHelper.Resolve <TakeDocService.Parameter.Interface.IEntityService>(); servEntity.AddUser(userId, entityId); return(Request.CreateResponse(HttpStatusCode.OK)); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message)); } }
public TakeDocModel.UserTk Create(TakeDocModel.UserTk user, TakeDocModel.Entity entity) { this.Create(user); servEntity.AddUser(user, entity); return(user); }