public Models.Vendor Create(Models.Vendor entity, string userName) { try { if (!VendorAccessControl.Pass(RestfulAction.Create, entity, userName)) { throw new NoAccessException("No Access"); } entity.Creator = userName; entity.Created = DateTime.Now; return(RestfulVendor.Create(entity)); } catch { throw; } }