예제 #1
0
 public static void Initialize(int facesCount)
 {
     using (UowData db = new UowData())
     {
         if (db.Faces.All().Count() == 0)
         {
             Face face;
             for (int i = 0; i < facesCount; i++)
             {
                 face = new Face();
                 db.Faces.Add(face);
             }
             db.SaveChanges();
         }
     }
 }
예제 #2
0
 public FaceViewModel(Face face)
 {
     this.FaceId = face.FaceId;
 }
예제 #3
0
 public FaceState(Face face, User user)
 {
     this.FaceId = face.FaceId;
     this.Face = face;
     this.OwnerUserId = user.UserId;
     this.OwnerUserName = user.UserName;
     this.Owner = user;
     this.RentDateTime = DateTime.Now;
     this.LeaveDateTime = null;
     this.LeisureActivity = false;
     this.WorkActivity = false;
     this.TradeActivity = false;
     this.StorageActivity = false;
     this.GardeningActivity = false;
     this.AccessActivity = false;
     this.SportsActivity = false;
     this.IsActive = true;
     this.State = 0;
     this.Type = 0;
     this.Purpose = null;
 }