Exemplo n.º 1
0
        public static MetaDataStrings GetAllMetadata(bool pretty = false)
        {
            string edmx = MedSimDtoRepository.GetEdmxMetadata();

            //File.WriteAllText("dtoMetadata.edmx", edmx);
            return(new MetaDataStrings
            {
                RequiredNavProperties = JsonConvert.SerializeObject(EdmxExplorer.GetRequiredNavProperties(edmx), pretty?Formatting.Indented:Formatting.None),
                Breeze = GetBreezeMetadata(edmx, pretty)
            });
        }
Exemplo n.º 2
0
 public void MyTestInitialize() {
     Guid userId;
     IEnumerable<string> roles;
     using (var db = new MedSimDbContext())
     {
         userId = (from u in db.Users
                   where u.Email == "*****@*****.**"
                   select u.Id).First();
         roles = (from r in db.Roles
                  where r.Users.Any(u => u.UserId == userId)
                  select r.Name).ToList();
     }
     _repo = new MedSimDtoRepository(new MockIPrincipal());
 }
Exemplo n.º 3
0
 public void MyTestCleanup() {
     if (_repo != null) {
         _repo.Dispose();
         _repo = null;
     }
 }