public int Add(Model.FilePermission filePermission) { using (WebPortalEntities dataEntities = new WebPortalEntities()) { dataEntities.AddToFilePermissions(filePermission); return dataEntities.SaveChanges(); } }