public RatingModel(Rating ratings)
 {
     this.Assign(ratings);
     Restaurant = new RestaurantModel();
     Voters     = new VoterModel();
     User       = new ApplicationUser();
     Periods    = new PeriodModel();
 }
Beispiel #2
0
        public Period Edit(Period entity, PeriodModel model)
        {
            entity.PeriodName = model.PeriodName;

            entity.ModifiedBy = model.ModifiedBy;
            //entity.CreatedBy = model.CreatedBy;
            entity.ModifiedDate = DateTime.Now;
            //IsApplicationActive = model.IsApplicationActive;
            //entity.CreatedDate = DateTime.Now;
            return(entity);
        }
Beispiel #3
0
 public Period Create(PeriodModel model)
 {
     return(new Period
     {
         PeriodName = model.PeriodName,
         Discription = model.Discription,
         EndDate = model.EndDate,
         StartDate = model.StartDate,
         CreatedBy = model.CreatedBy,
         //CreatedDate = model.CreatedDate,
         CreatedDate = DateTime.Now,
         //IsApplicationActive = model.IsApplicationActive
     });
 }