public void LookForApplication(string directory) { string appName = directory.Split('\\').Last(); var app = applicationService.GetByName(appName); if (app == null) { app = new Application { Name = appName }; applicationService.Create(app); var group = groupService.GetByName("administrators"); groupRelationshipService.SaveApplicationGroups(app.Id, new List <int> { group.Id }); } }
public HttpResponseMessage PutGroups(int id, [FromBody] IList <int> groups) { var response = groupRelationshipService.SaveApplicationGroups(id, groups); return(Request.CreateResponse(HttpStatusCode.OK)); }