public void CreateApplicationData(CreateApplicationDataRequest createApplicationDataRequest)
        {
            var adminRole = new Role(Guid.Empty, "Admin");

            roleRepository.Add(adminRole);
            var userRole = new Role(Guid.Empty, "User");

            roleRepository.Add(userRole);

            var userSecurity = new UserSecurity(
                Guid.Empty,
                createApplicationDataRequest.Email,
                AuthProvider.Local,
                Guid.NewGuid().ToString(),
                Guid.NewGuid().ToString(),
                Guid.NewGuid().ToString(),
                string.Empty,
                createApplicationDataRequest.Password,
                "en",
                "admin",
                "admin",
                null,
                Gender.Male,
                false,
                true,
                new List <Role> {
                adminRole
            }
                );

            userSecurityRepository.Add(userSecurity);

            CreateMenus(adminRole, userRole);
        }
        public HttpResponseMessage Create([FromBody] CreateApplicationDataRequest createApplicationDataRequest)
        {
            installationService.CreateApplicationData(createApplicationDataRequest);

            return(Request.CreateResponse(HttpStatusCode.OK));
        }
Example #3
0
        public IActionResult Create([FromBody] CreateApplicationDataRequest createApplicationDataRequest)
        {
            installationService.CreateApplicationData(createApplicationDataRequest);

            return(Ok());
        }