Example #1
0
        public void Register(string un, string pass, string eid)
        {
            TAmodel      m = new TAmodel();
            Registration r = new Registration();

            r.USER_NAME = un;
            r.PASSWORD  = pass;

            r.EMAILID = eid;
            m.Registrations.Add(r);
            m.SaveChanges();
        }
Example #2
0
        public void addcomment(string itemtype, int itemid, int rating)
        {
            TAmodel data = new TAmodel();
            rating  r    = new rating();

            // r.Rating_ID = 2;
            r.itemid   = itemid;
            r.itemtype = itemtype;
            r.Rating   = rating;
            r.ratedby  = 1;
            data.ratings.Add(r);
            data.SaveChanges();
        }