public Nerd GetLogin(string usernameoremail, string password) { Nerd n = DB.Nerds.FindByUserNameAndPassword(usernameoremail, password); n = n ?? DB.Nerds.FindByEmailAndPassword(usernameoremail, password); return(n); }
public IActionResult Index() { var nerd = new Nerd { Age = 38, Name = "Daniel Nordmark" }; return(View(nerd)); }
public string GetUsernameFromIdentifier(Guid indentifier) { Nerd n = DB.Nerds.FindByGuid(indentifier.ToString()); if (n != null) { return(n.Name); } else { return(null); } }
/// <summary> /// Load graphics content for the game. /// </summary> public override void LoadContent() { if (content == null) { content = new ContentManager(ScreenManager.Game.Services, "Content/GraphicsContent"); } gameFont = content.Load <SpriteFont>("menufont"); // spriteBatch = new SpriteBatch(GraphicsDevice); //määritellään background mBackgroundOne = new Sprite(); mBackgroundOne.LoadContent(this.content, "Background01"); mBackgroundOne.Position = new Vector2(0, 0); mBackgroundOne.Scale = 1; //määrritellään tuxi nerd = new Nerd(); nerd.LoadContent(this.content); nerd.Position.X = 800; nerd.Position.Y = 300; //tarkoitus tehdä tästä "possu" target = new Sika(); target.LoadContent(this.content); target.Position.X = 900; target.Position.Y = 600; // mBackgroundTwo.LoadContent(this.content, "Background02"); // mBackgroundTwo.Position = new Vector2(mBackgroundOne.Position.X + mBackgroundOne.Size.Width, 0); //mBackgroundThree.LoadContent(this.Content, "Background03"); //mBackgroundThree.Position = new Vector2(mBackgroundTwo.Position.X + mBackgroundTwo.Size.Width, 0); //mBackgroundFour.LoadContent(this.Content, "Background04"); //mBackgroundFour.Position = new Vector2(mBackgroundThree.Position.X + mBackgroundThree.Size.Width, 0); //mBackgroundFive.LoadContent(this.Content, "Background05"); //mBackgroundFive.Position = new Vector2(mBackgroundFour.Position.X + mBackgroundFour.Size.Width, 0); //lintu //tämän voi poistaa lopullisesta, mutta antaa paremman fiiliksen kun load screeni näkyy hetken :) Thread.Sleep(1000); // once the load has finished, we use ResetElapsedTime to tell the game's // timing mechanism that we have just finished a very long frame, and that // it should not try to catch up. ScreenManager.Game.ResetElapsedTime(); //vanhasta luokasta revitut dädät: // Create a new SpriteBatch, which can be used to draw textures. //mitä näillä tehdään? //mSprite.LoadContent(this.Content, "birdy"); //mSprite.Position = new Vector2(125, 245); //mSpriteTwo.LoadContent(this.Content, "birdy"); //mSpriteTwo.Position.X = 300; //mSpriteTwo.Position.Y = 300; }