Пример #1
0
        public HttpResponseMessage Create(ClassModel model)
        {
            var newClassModel = new DataLayer.DomainModels.ClassModel
            {
                ClassName   = model.ClassName,
                Location    = model.Location,
                TeacherName = model.TeacherName
            };
            var classId = _classService.CreateNewClass(newClassModel);

            return(Request.CreateResponse(HttpStatusCode.OK, classId));
        }
Пример #2
0
        public bool InsertClass()
        {
            Class c = new Class();

            c.Id                     = "2";
            c.Abstract               = "";
            c.ClassName              = "2";
            c.CourseId               = "1";
            c.CreatedByUserId        = "b11dcc5b-be63-4dbd-8124-3bcc0d55a142";
            c.TotalLearns            = 1;
            c.TotalLearns            = 1;
            c.NumberOfGrammars       = 1;
            c.NumberOfPhrases        = 1;
            c.NumberOfPronunciations = 1;
            c.NumberOfWeeks          = 1;
            c.NumberOfWords          = 1;
            c.IsMaintained           = false;
            m_classService.CreateNewClass(c);
            return(true);
        }