コード例 #1
0
        public string Set([FromBody] CharakterDataRequest <t_Charakter> request)
        {
            var repo = new SQLCharakterRepository(Context);

            repo.SetbyView(request.Data);
            return(CreateResponse(repo.GetList()));
        }
コード例 #2
0
        public string Delete([FromBody] CharakterIDRequest request)
        {
            var charakter = this.GetDSASQLCharakter(request);

            charakter.Delete();

            var repo = new SQLCharakterRepository(Context);

            return(CreateResponse(repo.GetList()));
        }
コード例 #3
0
        public string Import([FromBody] DataRequest <string> request)
        {
            JSONCharakter x         = JSONCharakter.DeSerializeJson(request.Data, out string errorstring);
            var           charakter = new SQLCharakterRepository(Context).CreateDSACharakter(Context, "New Charakter");

            var abstractcharakter = GetDSASQLCharakter(charakter.Id);

            abstractcharakter.Import(x);

            return(CreateResponse(charakter));
        }
コード例 #4
0
        public override void Delete()
        {
            ((SQLMoneyRepository)this.Money).Delete();
            ((SQLAPRepository)this.AP).Delete();
            ((SQLDescriptionRepository)this.Description).Delete();
            ((SQLAttributRepository)this.Attribute).DeleteAll();
            ((SQLTalentRepository)this.Talente).DeleteAll();
            ((SQLTraitRepository)this.Traits).DeleteAll();

            var repo = new SQLCharakterRepository(this.applicationContext);

            repo.Delete(this.charakterID);
            repo.Submit();
        }
コード例 #5
0
        public string HttpRequest()
        {
            var name      = "New Charakter";
            var repo      = new SQLCharakterRepository(Context);
            var charakter = repo.CreateDSACharakter(Context, name);

            var abstractcharakter = GetDSASQLCharakter(charakter.Id);

            //Attribute Default
            var descriptions = abstractcharakter.Description;
            var attributRepo = abstractcharakter.Attribute;

            var descriptionView = new DescriptionView()
            {
                Name = name
            };

            abstractcharakter.Description.SetByView(descriptionView);

            var attributList = new List <CharakterAttribut>
            {
                CharakterAttribut.Mut,
                CharakterAttribut.Klugheit,
                CharakterAttribut.Intuition,
                CharakterAttribut.Charisma,
                CharakterAttribut.Fingerfertigkeit,
                CharakterAttribut.Gewandheit,
                CharakterAttribut.Konstitution,
                CharakterAttribut.Körperkraft,
                CharakterAttribut.Sozialstatus
            };

            foreach (var attribut in attributList)
            {
                attributRepo.SetAKT(attribut, 9);
            }


            //CreateCharakterTestValues(abstractcharakter) ;

            return(CreateResponse(charakter));
        }
コード例 #6
0
        public string GetList()
        {
            var repo = new SQLCharakterRepository(Context);

            return(CreateResponse(repo.GetList()));
        }