static void CreateAdmin(UserStore userStore) { User admin = new User { UserName = "******", FirstName = "Admin", Password = "******", UserLevel = UserLevel.Admin }; userStore.AddItem(admin); userStore.Save(); }
public async Task <ActionResult <User> > CreateUser(string name) { try { return(Ok(await _bugTrackerStore.AddItem(new User { Name = name }))); } catch (Exception ex) { return(NotFound()); } }